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

Method InputSchema

pkg/tools/builtin/read.go:30–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30func (t *ReadTool) InputSchema() map[string]any {
31 return map[string]any{
32 "type": "object",
33 "properties": map[string]any{
34 "file_path": map[string]any{
35 "type": "string",
36 "description": "要读取的文件路径,必须是绝对路径",
37 },
38 "offset": map[string]any{
39 "type": "integer",
40 "description": "读取的起始行号(从1开始计数),默认为1",
41 },
42 "limit": map[string]any{
43 "type": "integer",
44 "description": "读取的最大行数,默认读取整个文件",
45 },
46 },
47 "required": []string{"file_path"},
48 }
49}
50
51func (t *ReadTool) Execute(ctx context.Context, input map[string]any, tc *tools.ToolContext) (any, error) {
52 // 获取参数

Callers 1

TestReadTool_InputSchemaFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestReadTool_InputSchemaFunction · 0.76