Skip to main content
Glama

Extend Execution TTL

extend_ttl

Renews the active execution window for a claimed contract by resetting its claim timestamp, preventing long-running tasks from timing out before completion.

Instructions

Heartbeat renewal for long-running execution: restarts the active execution window of a CLAIMED contract.

Behavior & Side Effects

  • Mutates database: Resets claimed_at=nowMs and increments extend_count (max 5 renewals per holder, bounded by created_at + 4 * queue_ttl_sec).

Return Value

Returns { ok, contract_id, status: 'CLAIMED' | 'TIMED_OUT', claimed_at?, expires_at?, extend_count, max_extends, remediation?, message }.

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": {
      "contract_id": "<contract_id>"
    },
    "name": "extend_ttl"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idNoCurrent holder agent identifier. Must match target_agent of the claimed contract (defaults to AGENT_NAME env var).
claim_tokenNoExclusive lease token returned in contract.claim_token by poll_next_task (FC-301).
contract_idYesThe CLAIMED contract ID whose active execution window should be renewed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • addedInput schema / properties / claim_token
      Added value: +{
      +  "description": "Exclusive lease token returned in contract.claim_token by poll_next_task (FC-301).",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Addedv0.3.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, it discloses the exact mutation (resets claimed_at=nowMs, increments extend_count) and hard limits: max 5 renewals per holder, bounded by created_at + 4 * queue_ttl_sec. It also documents the failure outcome TIMED_OUT and a remediation field, which is precisely the behavioral context annotations alone cannot convey.

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

Conciseness5/5

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

The definition is front-loaded with a one-line purpose, then cleanly sections behavior and return value. Every sentence carries operational information — mutation target, renewal cap, and response shape — with no filler.

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

Completeness5/5

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

With no output schema, the description correctly compensates by enumerating the return object's fields including status, extend_count, and remediation. Combined with the fully documented input schema, an agent has everything needed to invoke and interpret the call.

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

Parameters3/5

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

Schema description coverage is 100%, so all three parameters are already documented in the schema itself; the description only reinforces that the target must be a CLAIMED contract. It adds little semantic meaning beyond what the schema provides, so the baseline score applies.

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

Purpose5/5

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

The description names a specific operation (heartbeat renewal / restarting the active execution window) on a specific resource (a CLAIMED contract), which is clearly distinct from sibling mutation tools like release_contract or fail_contract. An agent can identify the operation without opening the schema.

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

Usage Guidelines4/5

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

It gives a clear usage context — heartbeat renewal for long-running executions before the lease expires — which implies when to call it. It stops short of explicit exclusions or naming alternatives (e.g., release the contract instead if the work cannot finish), so the guidance is strong but not complete.

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