Skip to main content
Glama

Apply a cooperation action

cooperation_apply
Idempotent

Commit one authenticated metadata action with revision and generation checks.

Instructions

Commit one authenticated metadata action with revision and generation checks.

Claims coordinate participating clients; they do not fence shell writes or
admit heavy execution. An expired heartbeat never grants ownership. Scope
and host/user authorization remain mandatory. Independent-root capability
loss has no online reset; owner cleanup is an explicitly authorized offline
operation. This tool executes no model, shell mutation, or chat message.
workspace names the physical checkout this execution runs in, and is followed only
inside an owner-registered checkout grant of this session's workspace; any other
path is scope_denied.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "request": "<request>"
    },
    "name": "cooperation_apply"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYesClosed agents-core/cooperation/1 mutation object or raw JSON. Required protocol, repository_id, participant_id, capability, operation_id, expected_revision (integer), expected_generation (integer), action. Optional subject_id is an authorized registered child. action.kind is exactly declare_intent/propose/acknowledge/reject/acquire/heartbeat/checkpoint/release/handoff/accept_artifact/cancel/recover; read agents-core://cooperation/schema for every closed action payload. Retry an ambiguous result with the identical operation_id and body. Maximum 32768 UTF-8 bytes, depth 8; no unknown fields or duplicate keys.
workspaceNoAbsolute path of your working directory, the project this session works in. Pass it whenever you have one. It never widens this session's grant: over HTTP the workspace registered for the connection decides, and over stdio it is checked against the client's own MCP roots unless this session's root is already pinned, when it is ignored. Each tool's description says what it does with a path that grant does not cover.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv26.10.18
    • changedInput schema / properties / workspace / description
      Previous value: -"Absolute path of your working directory, the project this session works in. Pass it whenever you have one: one server can serve several sessions."New value: +"Absolute path of your working directory, the project this session works in. Pass it whenever you have one. It never widens this session's grant: over HTTP the workspace registered for the connection decides, and over stdio it is checked against the client's own MCP roots unless this session's root is already pinned, when it is ignored. Each tool's description says what it does with a path that grant does not cover."
    • addedOutput schema / $defs / Checkpoint / properties / external_quota
      Added value: +{
      +  "items": {
      +    "$ref": "#/$defs/ExternalQuotaObservation"
      +  },
      +  "maxItems": 50,
      +  "title": "External Quota",
      +  "type": "array"
      +}
    • addedOutput schema / $defs / ErrorResponse / properties / next_free_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Next Free At"
      +}
    • addedOutput schema / $defs / ErrorResponse / properties / resource_key
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 4000,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Resource Key"
      +}
    • addedOutput schema / $defs / ExternalQuotaObservation
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "A published observation about a shared external allowance.\n\n``paused`` is a limit response with the next free time derived from its own\nevidence; ``consumed`` is allowance spent by a run nobody requested, which\ncannot be queued and is therefore recorded after the fact. The key is\ncanonicalized so sessions reading different platform surfaces agree.",
      +  "properties": {
      +    "evidence": {
      +      "maxLength": 4000,
      +      "minLength": 1,
      +      "title": "Evidence",
      +      "type": "string"
      +    },
      +    "kind": {
      +      "enum": [
      +        "paused",
      +        "consumed"
      +      ],
      +      "title": "Kind",
      +      "type": "string"
      +    },
      +    "next_free_at": {
      +      "anyOf": [
      +        {
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Next Free At"
      +    },
      +    "observed_at": {
      +      "minimum": 0,
      +      "title": "Observed At",
      +      "type": "number"
      +    },
      +    "resource_key": {
      +      "maxLength": 512,
      +      "minLength": 1,
      +      "title": "Resource Key",
      +      "type": "string"
      +    },
      +    "wait_source": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "stated",
      +            "rule",
      +            "default"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Wait Source"
      +    }
      +  },
      +  "required": [
      +    "resource_key",
      +    "kind",
      +    "evidence",
      +    "observed_at"
      +  ],
      +  "title": "ExternalQuotaObservation",
      +  "type": "object"
      +}
    • changedOutput schema / $defs / OwnedResource / properties / resource_type / enum
      Previous value: -[
      -  "physical_file",
      -  "physical_subtree",
      -  "logical_intent",
      -  "integration_target",
      -  "shared_git",
      -  "heavy_execution"
      -]New value: +[
      +  "physical_file",
      +  "physical_subtree",
      +  "logical_intent",
      +  "integration_target",
      +  "shared_git",
      +  "heavy_execution",
      +  "external_quota"
      +]
    • changedOutput schema / $defs / ResourceSpec / properties / resource_type / enum
      Previous value: -[
      -  "physical_file",
      -  "physical_subtree",
      -  "logical_intent",
      -  "integration_target",
      -  "shared_git",
      -  "heavy_execution"
      -]New value: +[
      +  "physical_file",
      +  "physical_subtree",
      +  "logical_intent",
      +  "integration_target",
      +  "shared_git",
      +  "heavy_execution",
      +  "external_quota"
      +]
  2. Addedv26.10.16

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations it adds real behavioral context: claims do not fence shell writes, expired heartbeats never grant ownership, scope and host/user authorization remain mandatory, capability loss has no online reset, and unauthorized workspace paths yield scope_denied. The remaining gap is that the prose is abstract ('Claims coordinate participating clients', 'Independent-root capability loss') and never states in plain terms what state changes on success or what error surface to expect, but the authorization and failure behavior is well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose sentence is correctly front-loaded, but the middle is five dense, jargon-heavy assertions ('fence shell writes', 'Independent-root capability loss') whose operational meaning an agent must guess at. The workspace sentence is long and clausal. Nothing is repetitive, but several lines could be stated in plainer, shorter form.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex closed-payload mutation tool with an output schema and annotations already declaring write/idempotent/non-destructive, the description covers authorization, path scoping, and irreversibility of an expired heartbeat. The main omission is a plain statement of success semantics and the ambiguous-result retry rule being left to the schema's request description rather than surfaced here.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, and the description earns above it by explaining the consequence of the workspace parameter: the path is honored only inside an owner-registered checkout grant, and anything else is scope_denied. The request object's protocol fields and the action-kind enumeration are left entirely to the schema, which is reasonable given its depth.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource: 'Commit one authenticated metadata action with revision and generation checks.' That distinguishes it from the read/receive/wait siblings, and 'executes no model, shell mutation, or chat message' further bounds what kind of commit this is. It never names which sibling to use for reads or for non-commit flows, so differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: you commit a cooperation action and the schema carries the retry rule for ambiguous results. The description lists prohibitions ('does not fence shell writes', 'no model, shell mutation, or chat message') that act as exclusions, but it names no alternative tool for those cases and gives no prerequisites for choosing this over cooperation_send or cooperation_request_update.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.