MCPcopy
hub / github.com/wavetermdev/waveterm / GetBuilderListFilesToolDefinition

Function GetBuilderListFilesToolDefinition

pkg/aiusechat/tools_builder.go:282–306  ·  view source on GitHub ↗
(appId string)

Source from the content-addressed store, hash-verified

280}
281
282func GetBuilderListFilesToolDefinition(appId string) uctypes.ToolDefinition {
283 return uctypes.ToolDefinition{
284 Name: "builder_list_files",
285 DisplayName: "List App Files",
286 Description: fmt.Sprintf("List all files in app %s", appId),
287 ToolLogName: "builder:list_files",
288 Strict: false,
289 InputSchema: map[string]any{
290 "type": "object",
291 "properties": map[string]any{},
292 "additionalProperties": false,
293 },
294 ToolCallDesc: func(input any, output any, toolUseData *uctypes.UIMessageDataToolUse) string {
295 return "listing files"
296 },
297 ToolAnyCallback: func(input any, toolUseData *uctypes.UIMessageDataToolUse) (any, error) {
298 result, err := waveappstore.ListAllAppFiles(appId)
299 if err != nil {
300 return nil, err
301 }
302
303 return result, nil
304 },
305 }
306}

Callers 1

WaveAIPostMessageHandlerFunction · 0.85

Calls 1

ListAllAppFilesFunction · 0.92

Tested by

no test coverage detected