tools-mcp
Guide Swarms tool schema conversion, BaseTool helpers, and MCP client/server workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- tools-mcp
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guide Swarms tool schema conversion, BaseTool helpers, and MCP client/server workflows.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/api-reference.md2.7 KB
- 参考文档references/troubleshooting.md1.6 KB
- 参考文档references/workflows.md2.2 KB
- 脚本scripts/mcp_local_server.py1.7 KB
- 脚本scripts/mcp_smoke.py3.1 KB
- 脚本scripts/tool_schema_smoke.py911 B
03 SKILL.md 正文
Tools and MCP
Use this sub-skill when the user wants to turn Python callables into tools, reason about tool schemas, or connect Swarms to an MCP server.
Owns these workflows
- Convert functions and Pydantic models into tool schemas.
- Use
BaseToolto inspect, validate, and execute local tools. - Configure
MCPManager,MCPConnection, andMCPOAuthConfig. - Use one or many MCP servers from an
Agent. - Build or smoke-test a small local MCP server.
Does not own
- Single-agent prompt, memory, marketplace, or fallback behavior; use
single-agent. - CLI file loading or autoswarm generation; use
cli-loaders. - Multi-agent orchestration, routing, or swarm selection; use
multi-agent-workflows.
Read this sub-skill when the request mentions
BaseTool,tool_registry,func_to_dict,base_model_to_openai_function, orexecute_tool_by_name.MCPManager,MCPConnection,MCPOAuthConfig,mcp_url,mcp_urls, ormcp_configs.streamable_http,sse,stdio, auth headers, bearer tokens, OAuth, or tool routing.Agent(..., mcp_url=...)or local MCP server debugging.
Working shape
- Decide whether the user needs local tool schemas, a direct MCP client, or an MCP server.
- Check auth style and transport before promising a live connection.
- Use the bundled references for API shapes and recovery steps.
- Prefer a local server smoke test before a remote MCP endpoint.
What to read next
references/api-reference.mdfor schema helpers and MCP config objects.references/workflows.mdfor function-schema, Agent+MCP, and local-server recipes.references/troubleshooting.mdfor auth, transport, and tool routing failures.scripts/tool_schema_smoke.pyandscripts/mcp_smoke.pyfor safe offline checks.
Typical user questions this sub-skill should answer
- How do I convert a function or Pydantic model into a tool schema?
- How do I route MCP tools from one or many servers?
- Why does the client say it cannot find a tool name?
- Why does a local MCP server work on one header but not another?
- How do I prove the tool path without talking to a remote service?
Route boundaries
- If the task is mainly about one agent’s prompt or memory, route to
single-agent. - If the task is about command-line creation or file loaders, route to
cli-loaders. - If the task is about a swarm shape or router choice, route to
multi-agent-workflows.
Acceptance checklist
- The response should identify the right helper function or MCP config object.
- The response should state which transport and auth style are required.
- The response should provide a concrete smoke or validation step.
- The response should include a recovery path for missing dependencies, bad headers, or empty tool lists.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).