MCPcopy Create free account
hub / github.com/53AI/53AIHub / parseMCPFileType

Function parseMCPFileType

api/controller/mcp_tools.go:371–380  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

369}
370
371func parseMCPFileType(value string) (int, error) {
372 switch strings.ToLower(strings.TrimSpace(value)) {
373 case "file":
374 return model.FILE_TYPE_FILE, nil
375 case "folder", "dir", "directory":
376 return model.FILE_TYPE_DIR, nil
377 default:
378 return 0, errors.New("type 仅支持 file 或 folder")
379 }
380}

Callers 1

registerMCPFileToolsFunction · 0.85

Calls 1

NewMethod · 0.45

Tested by

no test coverage detected