Skip to main content
Glama

terminateContract

Destructive

Terminate a signed contract immediately, with a reason. Terminating is permanent and cannot be undone, and the customer is emailed about it. Returns the terminated contract. It does not end the subscription or void the invoices the contract created: change those with the subscription and invoice tools. Only a signed contract can be terminated. 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>",
      "reason": "<reason>"
    },
    "name": "terminateContract"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonYesReason for termination.
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.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description adds the consequences that annotations cannot convey: the action is permanent and irreversible, the customer is emailed, and the effect does not cascade to subscription or invoices. It also states the return value ('Returns the terminated contract').

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?

Front-loaded with the action and its irreversibility, then preconditions, then alternatives, then ID sourcing. Every sentence carries a distinct constraint; none is 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?

For a two-parameter destructive mutation, the description covers irreversibility, side effects (customer email), non-cascading scope, preconditions, ID provenance, and alternatives. With an output schema present, nothing essential for correct invocation is missing.

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 reason enum is already documented, so the baseline is 3. The description goes beyond the schema by prescribing provenance for contractId ('Get contractId from getContracts. Never invent UUIDs; only use values from prior tool responses'), which is genuine operational guidance not present in the schema.

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?

States a specific verb and resource ('Terminate a signed contract') plus the precondition that only signed contracts qualify, which narrows the target beyond a generic contract mutation. It does not, however, say anything about the sibling deleteContract, so an agent must still reason about which of the two removal-style tools applies.

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?

Explicitly names when-not/alternatives: it 'does not end the subscription or void the invoices the contract created: change those with the subscription and invoice tools,' and restricts use to signed contracts. It also tells the agent where contractId comes from (getContracts) and forbids invented UUIDs.

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