MCP 2025-06-18

file_unlink

Remove an authorized link without deleting bytes.

Scopes

The target entity's read scopes apply too: a task needs read:projects; a memory needs read:memory, and read:agent_sessions when it was recorded from an agent session; a document follows its owner's document scopes. Unless the agent manages the file or created the link, it also needs the scopes to link the entity: write:projects for a task, curate:memory (or contribute:memory on your own proposal) for a memory. Without them the entity reads as NOT_FOUND.

  • link:files

Input schema

This schema is shared with tools/list, including the required fields and additionalProperties rules.

Synthetic example · JSON
{
  "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
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    },
    "expectedVersion": {
      "type": "integer",
      "minimum": 1
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    },
    "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",
    "id",
    "expectedVersion",
    "idempotencyKey",
    "target"
  ]
}

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.

Synthetic example · JSON
{
  "jsonrpc": "2.0",
  "id": "example_file_unlink",
  "method": "tools/call",
  "params": {
    "name": "file_unlink",
    "arguments": {
      "accountId": "<accountId>",
      "serviceTenancyId": "<serviceTenancyId>",
      "id": "<id>",
      "expectedVersion": 1,
      "idempotencyKey": "retry-1",
      "target": {
        "type": "task",
        "id": "<id>"
      }
    }
  }
}

Read the result before continuing

The file link 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.