feat(files): update save_file tool description and enforce size limit for base64 payloads

This commit is contained in:
2026-03-31 00:20:36 +02:00
parent 4bd3c4e0ba
commit 3819eb4fee
3 changed files with 26 additions and 2 deletions

View File

@@ -136,7 +136,7 @@ func New(cfg config.MCPConfig, logger *slog.Logger, toolSet ToolSet) http.Handle
addTool(server, logger, &mcp.Tool{
Name: "save_file",
Description: "Store a base64-encoded file such as an image, document, or audio clip, optionally linking it to a thought.",
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.",
}, toolSet.Files.Save)
addTool(server, logger, &mcp.Tool{