feat(files): introduce upload_file tool for staging files and enhance save_file documentation
This commit is contained in:
@@ -134,9 +134,14 @@ func New(cfg config.MCPConfig, logger *slog.Logger, toolSet ToolSet) http.Handle
|
||||
Description: "A stored file. Read a file's raw binary content by its id. Use load_file for metadata.",
|
||||
}, toolSet.Files.ReadResource)
|
||||
|
||||
addTool(server, logger, &mcp.Tool{
|
||||
Name: "upload_file",
|
||||
Description: "Stage a file and get an amcs://files/{id} resource URI. Provide content_path (absolute server-side path, no size limit) or content_base64 (≤10 MB). Optionally link immediately with thought_id/project, or omit them and pass the returned URI to save_file later.",
|
||||
}, toolSet.Files.Upload)
|
||||
|
||||
addTool(server, logger, &mcp.Tool{
|
||||
Name: "save_file",
|
||||
Description: "Store a file and optionally link it to a thought. Supply either content_base64 (≤10 MB) or content_uri (amcs://files/{id} from a prior POST /files upload). For files larger than 10 MB, upload via POST /files first and pass the returned URI as content_uri.",
|
||||
Description: "Store a file and optionally link it to a thought. Supply either content_base64 (≤10 MB) or content_uri (amcs://files/{id} from a prior upload_file or POST /files call). For files larger than 10 MB, use upload_file with content_path first.",
|
||||
}, toolSet.Files.Save)
|
||||
|
||||
addTool(server, logger, &mcp.Tool{
|
||||
|
||||
Reference in New Issue
Block a user