Skip to main content
Glama

deleteContract

Destructive

Delete a draft contract. Deleting is permanent and cannot be undone. Returns the contract as it was before the delete. Only a draft can be deleted: an issued contract the customer has not signed is declined once its expiration date passes, and a signed one is ended with terminateContract. Get contractId from getContracts. Never invent UUIDs; only use values from prior tool responses.

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": {
      "contractId": "<contractId>"
    },
    "name": "deleteContract"
  }
}

Input Schema

NameRequiredDescriptionDefault
contractIdYesThe id of the contract.

Output Schema

NameRequiredDescriptionDefault
contractYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / contract / properties / renewedByContractRef
      Added value: +{
      +  "description": "ID of the renewal contract of this contract, present while the renewal is issued and after it is signed. It is removed when the renewal is declined or expires.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedOutput schema / properties / contract / properties / renewsContractRef
      Added value: +{
      +  "description": "ID of the signed contract that this contract renews, present on a renewal contract.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • changedOutput schema / properties / contract / properties / subscriptionRef / description
      Previous value: -"ID of the subscription created when the contract was issued, present when the action is subscription."New value: +"ID of the subscription of the contract, present when the action is subscription. An issued contract has the pending subscription created at issue. A signed renewal contract has the subscription that it renewed."
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond destructiveHint=true, the description states the deletion is permanent and irreversible and that the pre-delete contract is returned, which is behavioral information annotations cannot convey. The draft-only precondition is the kind of constraint that prevents a failed or wrong call.

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?

Four sentences, each load-bearing: action, irreversibility, return value, precondition, and ID sourcing. The most decision-relevant facts (draft-only, permanent) are front-loaded before the alternatives and ID guidance.

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?

For a single-parameter destructive tool with an output schema and annotations, everything an agent needs is present: precondition, irreversibility, alternatives for other states, and ID provenance. Return values are already covered by the output schema, so no further description is required.

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 100% and the single contractId is fully documented, so the baseline is 3; the description adds real value by specifying provenance ('Get contractId from getContracts') and a hard prohibition on invented UUIDs. It does not add format detail, but the schema already carries the UUID pattern.

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?

Starts with a specific verb and resource ('Delete a draft contract') and immediately scopes it to the draft state, which cleanly separates it from terminateContract and the get/issue/update siblings. An agent knows exactly what entity this acts on and under what condition.

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

Usage Guidelines5/5

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

Provides explicit when-to-use and when-not-to-use rules: drafts only here, unsigned-expired contracts are declined rather than deleted, signed contracts go to terminateContract. It also points to getContracts as the source of the ID, so the agent has a complete routing path with no inference needed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources