MCP 2025-06-18
documents_execute
Open or update a shared document, or read complete commit and revision pages. Session receipts, epoch/version CAS, exact read leases and signed cursors are required by the selected operation.
Scopes
Project documents need read:projects to read and write:projects to change. Work documents need write:work; Memory documents follow the Memory scopes.
- read:projects
Input schema
This schema is shared with tools/list, including the required fields and additionalProperties rules.
{
"type": "object",
"properties": {
"operation": {
"enum": [
"open",
"head",
"append",
"name",
"restore",
"steps",
"revisions"
]
},
"payload": {
"type": "object",
"description": "Closed document operation input, including the public document identity."
}
},
"required": [
"operation",
"payload"
],
"additionalProperties": false
}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_documents_execute",
"method": "tools/call",
"params": {
"name": "documents_execute",
"arguments": {
"operation": "open",
"payload": {}
}
}
}Read the result before continuing
The document head, commit or revision page.
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.