graph-tool-call MCP server
2026년 10월 8일 커밋AI 클라이언트가 대규모 도구 카탈로그를 검색하여 실행에 필요한 대상 도구와 필수 선행 도구만 가져올 수 있도록 합니다.
다른 이름 SonAIengine/graph-tool-call
- 스타
- 18
- Tools
- 3
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 10월 8일
- 라이선스
- MIT
graph-tool-call MCP란?
AI 클라이언트가 대규모 도구 카탈로그를 검색하여 실행에 필요한 대상 도구와 필수 선행 도구만 가져올 수 있도록 합니다. 3개 도구를 제공합니다. 예: evidence, token, side.
프로젝트 README에서 생성된 요약
graph-tool-call MCP server 정보
graph-tool-call은 도구 검색을 단순한 유사도 검색이 아닌 그래프 문제로 다룸으로써 AI 에이전트를 위한 대규모 도구 카탈로그 관리를 가능하게 합니다. 사용자가 요청한 기본 도구뿐만 아니라, 해당 도구의 입력값을 생성하는 데 필요한 선행 도구까지 식별합니다. 이러한 접근 방식은 환불 처리를 시도하기 전에 주문 ID를 먼저 찾는 것과 같이 에이전트가 완전한 실행 체인을 갖추도록 보장합니다.
개발자는 ToolGraph를 사용하여 이 로직을 Python 애플리케이션에 통합하거나, streamable HTTP를 통해 원격 MCP server로 배포할 수 있습니다. 이 시스템은 OpenAPI, GraphQL, MCP tools 및 Python functions로부터의 데이터 수집을 지원합니다. 또한 특정 미들웨어와 패치를 통해 OpenAI, Anthropic, LangChain와 같은 주요 프레임워크와 함께 작동합니다. 토큰 예산에 맞춘 스키마를 제공함으로써 모델에 전송되는 컨텍스트를 줄여주며, 이는 높은 선택 품질을 유지하면서도 토큰 제한 내에서 작동할 수 있도록 돕습니다.
활용 사례
- 1복잡한 도구 의존성 체인 해결AI 에이전트가 특정 액션 도구를 호출하기 전에 ID를 가져오기 위한 검색 도구를 호출해야 함을 자동으로 식별할 수 있습니다.
- 2LLM 컨텍스트 사용 최적화대규모 카탈로그를 관련 도구 및 필수 의존성으로 필터링하여 모델에 전송되는 토큰 수를 줄입니다.
- 3다양한 API 사양 수집기존 OpenAPI 또는 GraphQL 문서를 AI가 탐색할 수 있는 구조화된 그래프로 변 변환합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
graph-tool-call MCP 도구 3
README에서 감지됨evidencetokenside
| evidence | — | |
| token | — | |
| side | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능sonaiengine/graph-tool-call is public and reachablegithub.com/sonaiengine/graph-tool-call ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-08github.com/sonaiengine/graph-tool-call ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음3 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기graph-tool-call
Graph-structured retrieval for large LLM tool catalogs.
Find the target tool, the prerequisite tools that produce its inputs, and the smallest schema bundle that fits the planner's token budget.
Documentation · Quickstart · PyPI · Benchmarks
English · 한국어
The Problem
A semantic search for "refund an order" can find refundOrder. That is not
enough when the operation requires an order_id that the user does not have.
A usable candidate set also needs the operation that produces that field:
findOrdersByEmail(email) -> order_id -> refundOrder(order_id)
Large catalogs create a second problem: sending every schema to the model wastes context and can lower selection quality. graph-tool-call treats retrieval as a contract-aware graph problem instead of flat similarity search.
It provides:
- deterministic ingestion from OpenAPI, GraphQL introspection, MCP tools, Python functions, and structured tool catalogs;
- hybrid target retrieval with keyword, graph, optional embedding, and MCP annotation signals;
- evidence-backed target selection and typed prerequisite expansion;
- token-budgeted, contract-projected schemas for the model-facing catalog;
- readiness, failure, and trace metadata for application-side diagnostics;
- adapters for OpenAI, Anthropic, LangChain v1, MCP, Docker, and Kubernetes.
Authentication, tenant policy, approval, and product-specific execution remain in the host application.
See It in 30 Seconds
No model, API key, or network call is required:
uvx graph-tool-call demo dependency-chain
Selected target:
refundOrder(order_id)
Required producer:
findOrdersByEmail(email) -> order_id
evidence: api_contract, openapi_link
Execution order:
1. findOrdersByEmail
2. refundOrder
Planner context:
6 catalog tools -> 2 required tools
estimated tokens: 1476 -> 160 (89% fewer)
This demo runs the real retriever, deterministic target selector, typed dependency closure, and schema admission pipeline.
Installation
The core search and graph package uses only the Python standard library. Optional integrations are installed explicitly:
pip install graph-tool-call
pip install "graph-tool-call[openapi]" # YAML OpenAPI documents
pip install "graph-tool-call[korean]" # Kiwi tokenizer
pip install "graph-tool-call[langchain]" # LangChain v1 middleware
pip install "graph-tool-call[mcp]" # MCP server and proxy
pip install "graph-tool-call[all]" # all optional features
Python 3.10 through 3.14 are tested in CI.
Build and Search
OpenAPI
from graph_tool_call import ToolGraph
graph = ToolGraph.from_url(
"https://petstore3.swagger.io/api/v3/openapi.json",
cache="petstore.graph.json",
)
for result in graph.retrieve_with_scores("create a new pet", top_k=5):
print(result.tool.name, result.score, result.confidence)
OpenAPI ingestion preserves request and response schemas, parameter locations,
content types, security requirements, links, examples, response envelopes, and
typed consumes/produces contracts. Swagger 2.0, OpenAPI 3.0, and OpenAPI 3.1
are supported.
Inspect a collection before exposing it to an agent:
graph-tool-call inspect-openapi ./openapi.json --json
graph-tool-call build-openapi-collection ./openapi.json -o collection.json
The report contains stable readiness issue codes, semantic coverage, and edge quality rather than a single opaque score.
Other sources
from graph_tool_call.ingest import ingest_source
openapi_result = ingest_source(openapi_document)
graphql_result = ingest_source(introspection_result)
mcp_result = ingest_source({"tools": mcp_tools}, format_hint="mcp-tools")
python_result = ingest_source([read_file, write_file])
Every adapter returns normalized ToolSchema objects, capability metadata, and
structured unsupported-feature diagnostics.
Choose an Integration
| Environment | Recommended surface | What graph-tool-call owns |
|---|---|---|
| Python application | ToolGraph / graphify APIs |
ingest, search, evidence, dependency closure |
| OpenAI Responses or Chat Completions | patch_openai |
per-request function-tool filtering |
| Anthropic Messages | patch_anthropic |
per-request tool filtering |
| LangChain v1 | create_tool_selection_middleware |
model-call tool selection |
| Claude Code, Cursor, Windsurf | MCP proxy | many MCP backends behind 3 gateway tools |
| OpenAI Agents, PydanticAI, Google ADK | remote MCP server | protocol-neutral search service |
| Docker or Kubernetes | Streamable HTTP MCP | private deployable service |
See the compatibility matrix for validation boundaries. Protocol compatibility does not imply that every framework or cloud release is tested by this repository.
OpenAI Responses
from graph_tool_call.middleware import patch_openai
patch_openai(client, graph=graph, top_k=5)
response = client.responses.create(
model=model_name,
input="delete a user account",
tools=all_function_tools,
)
Hosted tools such as web search pass through unchanged. The same patch keeps legacy Chat Completions support.
LangChain v1
from langchain.agents import create_agent
from graph_tool_call.langchain import create_tool_selection_middleware
selection = create_tool_selection_middleware(langchain_tools, top_k=5)
agent = create_agent(
model,
tools=langchain_tools,
middleware=[selection],
)
The middleware intersects with tools still allowed by earlier permission or feature-flag middleware; it does not reintroduce filtered tools.
MCP server
graph-tool-call ingest ./openapi.json -o graph.json
graph-tool-call serve \
--graph graph.json \
--transport streamable-http \
--host 127.0.0.1 \
--port 8000
The MCP endpoint is /mcp; HTTP deployments also expose /healthz and
/readyz. Keep remote endpoints private or behind an authenticated gateway.
MCP proxy
graph-tool-call proxy \
--config ./mcp-backends.json \
--transport streamable-http
The proxy accepts local stdio, SSE, and Streamable HTTP backends. In gateway
mode it exposes search_tools, get_tool_schema, and call_backend_tool, then
notifies capable clients when matching backend tools become visible.
Reproducible Evidence
The release headline is deliberately model-free and small enough to replay in CI. On seven curated commerce cases, adding typed producer expansion to the same selected target produced:
| Metric | Target only | Target + graph producers |
|---|---|---|
| Required-producer recall | 14.3% | 100% |
| Candidate plan coverage | 47.6% | 100% |
| Candidate binding support | 14.3% | 100% |
| Target Recall@5 | - | 100% |
The case-level v0.47.0 artifact records fixture hashes, every expected target and producer, and replay commands:
make launch-evidence
make launch-evidence-check
The separate
observability artifact
checks that tracing leaves engine inputs unchanged, replays deterministically,
scrubs secrets, explains every decision, and stays below the documented
5ms/span p95 capture-cost gate:
make observability-evidence-check
This is an engine regression suite, not a population-level estimate of LLM tool-calling accuracy and not a state-of-the-art claim. Larger external comparisons, model-loop experiments, confidence intervals, and known weak cases are reported in Benchmark Results and the paper protocol.
Production Boundary
graph-tool-call is the retrieval and contract layer. A production adapter still owns:
- user and service authentication;
- tenant authorization and approval policy;
- downstream secrets and cookie handling;
- side-effect confirmation, cleanup, and audit retention;
- provider/model lifecycle and final response policy.
Do not store raw credentials in graph artifacts, tool descriptions, trace records, or model-visible arguments.
Documentation
| Start here | Purpose |
|---|---|
| Quickstart | first search, graph, readiness, and execution loop |
| Mental model | understand the pipeline and boundaries |
| OpenAPI ingestion | contract extraction and collection build |
| Target selection | ranking evidence and deterministic guard |
| Integrations | frameworks, MCP, and deployment |
| API reference | stable public Python surface |
| Roadmap | current product and research priorities |
Development
git clone https://github.com/SonAIengine/graph-tool-call.git
cd graph-tool-call
poetry install --with dev --all-extras
poetry run ruff check .
poetry run ruff format --check .
poetry run pytest tests/ -q
See CONTRIBUTING.md and the release checklist.
License
graph-tool-call MCP 질문
graph-tool-call MCP는 어떤 도구를 제공하나요?
3개 도구를 제공합니다. 예: evidence, token, side.
graph-tool-call은 모델에 전송되는 도구 수를 어떻게 줄이나요?
대상 도구와 타입이 지정된 필수 선행 도구를 검색하며, 토큰 예산에 맞춰 설계된 스키마만 모델용 카탈로그에 포함합니다.
어떤 도구 카탈로그 형식을 가져올 수 있나요?
OpenAPI, GraphQL introspection, MCP tools, Python functions 및 구조화된 도구 카탈로그를 가져올 수 있습니다.
MCP server로 실행 가능한가요?
네, /mcp 엔드포인트를 통해 streamable HTTP 기반의 구축된 그래프를 제공할 수 있으며, 프록시 모드를 사용하면 여러 MCP 백엔드를 3개의 게이트웨이 도구 뒤에 배치할 수 있습니다.
추가적인 Python 의존성이 필요한가요?
핵심 검색 및 그래프 패키지는 Python 표준 라이브러리만 사용합니다. OpenAPI, LangChain, MCP와 같은 통합 기능은 선택 사항입니다.
인증 및 인가 기능을 처리하나요?
아니요, 이 라이브러리는 검색 및 계약 레이어 역할을 합니다. 인증, 테넌트 정책 및 승인 권한은 호스트 애플리케이션이 관리합니다.