AS AgentScopeAPI 手册 / API Reference
工具与技能Tools & skills · 单元Unit 05

工具与 MCP:让模型安全地调用外部能力Tools and MCP: let the model call external capabilities safely

工具 schema 就是提示词的一部分。学完本单元,你能设计可被正确选择、可靠执行、可观测且可权限收口的工具,并把 MCP 服务接入同一套执行体系。Tool schemas are part of the prompt. After this unit you can design tools that are selected correctly, execute reliably, stay observable and pass permission checks, and expose MCP services through the same execution system.

10 道题questions 5 张概念卡concept cards 4 个相关事故related incidents

学习目标Learning goals

  • 把函数注册为工具并生成正确 schemaRegister functions as tools with correct schemas
  • 使用工具组与权限规则收敛执行范围Scope execution with tool groups and permission rules
  • 连接 MCP 服务并管理连接生命周期Connect MCP services and manage connection lifecycles

概念闪卡Concept cards

点击卡片翻面查看解释。Click a card to flip it and reveal the explanation.

关键 APIKey APIs

点击进入对应的 Python 或 Java 参考页。Open the exact Python or Java reference for each type.

问题巩固Check yourself

完成 10 道题;答错会自动进入错题本。Answer all ten questions. Wrong answers are added to your wrong-answer book automatically.

01Python 中注册和执行工具的组件是?Which Python component registers and executes tools?
02向 Python Toolkit 添加工具的方法是?How do you add a tool to a Python Toolkit?
03执行一个已注册工具的方法是?How do you execute a registered tool?
04按业务域批量启停工具应使用?What do you use to activate tools per business domain?
05Python 中连接 MCP 服务的客户端是?Which Python client connects to MCP services?
06MCP 支持哪些常见传输方式?Which transports does MCP commonly support?
07Java 中把方法标记为工具使用哪个注解?Which Java annotation marks a method as a tool?
08Java 中描述工具方法参数使用哪个注解?Which Java annotation describes tool method parameters?
09Java 中注册工具对象的方法是?Which Java method registers a tool object?
10MCP 连接的正确生命周期管理方式是?What is the correct MCP connection lifecycle?

接着看的生产事故Production incidents to read next

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.