MCP 2025-06-18
file_upload_begin
Reserve a single-part upload; target attachment additionally requires link:files.
Scopes
Also needs link:files when a target is given. The target entity's scopes apply too: a task needs read:projects, and write:projects to link; a memory needs read:memory, and curate:memory (or contribute:memory on your own proposal) to link, and read:agent_sessions when it was recorded from an agent session; a document follows its owner's document scopes. Without them the entity reads as NOT_FOUND.
- write:files
Input schema
This schema is shared with tools/list, including the required fields and additionalProperties rules.
{
"type": "object",
"additionalProperties": false,
"properties": {
"accountId": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"serviceTenancyId": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"expectedAuthorizationVersion": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"idempotencyKey": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"filename": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"mime": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"sizeBytes": {
"type": "integer",
"minimum": 0,
"maximum": 100000000
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"target": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"enum": [
"task",
"memory",
"briefing",
"document"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"accountId",
"serviceTenancyId",
"idempotencyKey",
"filename",
"mime",
"sizeBytes",
"sha256"
]
}Call this tool
Send it as POST https://www.specifywork.com/api/mcp. Authorization: Bearer <agent key>, a key that starts with sw_agent. Replace the example values with records your key can reach.
{
"jsonrpc": "2.0",
"id": "example_file_upload_begin",
"method": "tools/call",
"params": {
"name": "file_upload_begin",
"arguments": {
"accountId": "<accountId>",
"serviceTenancyId": "<serviceTenancyId>",
"idempotencyKey": "retry-1",
"filename": "<filename>",
"mime": "<mime>",
"sizeBytes": 0,
"sha256": "<sha256>"
}
}
}Read the result before continuing
The upload intent view.
A call returns content[0].text with the JSON result and structuredContent.result with the same value. A refused call returns isError: true and the error code in content[0].text.
A request being accepted is not proof of an external action completing. Keep correlation IDs and mutation idempotency keys unchanged across safe retries.