MCPcopy Create free account
hub / github.com/astercloud/aster / GetToolSchema

Method GetToolSchema

pkg/tools/bridge/bridge.go:173–184  ·  view source on GitHub ↗

GetToolSchema 获取工具的 schema

(name string)

Source from the content-addressed store, hash-verified

171
172// GetToolSchema 获取工具的 schema
173func (b *ToolBridge) GetToolSchema(name string) (map[string]any, error) {
174 tool, err := b.GetTool(name)
175 if err != nil {
176 return nil, err
177 }
178
179 return map[string]any{
180 "name": tool.Name(),
181 "description": tool.Description(),
182 "input_schema": tool.InputSchema(),
183 }, nil
184}
185
186// ToolChain 工具链 - 按顺序执行一系列工具,前一个的输出可作为后一个的输入
187type ToolChain struct {

Callers 2

handleToolSchemaMethod · 0.80

Calls 4

GetToolMethod · 0.95
NameMethod · 0.65
DescriptionMethod · 0.65
InputSchemaMethod · 0.65

Tested by 1