Skip to main content
Glama
Zenskar MCP Server

Zenskar MCP Server

Official
by zenskar

expireContract

expireContract

Expires, ends, terminates, or cancels active or paused contracts on a specified date by updating their end date; pass multiple contract IDs in one call to stop several contracts together.

Instructions

THE ONLY tool that can expire, end, terminate or cancel contracts — use it whenever the user wants contracts to stop on a given date, including when they phrase it as 'update the expiry date'. Do NOT use updateContract for this. To expire SEVERAL contracts, pass every id in contractIds on a SINGLE call — never call this tool once per contract, as each call raises its own approval dialog and only the most recent one can be approved. Expire an ACTIVE or PAUSED contract by adjusting its end_date. Allowed status transitions: ACTIVE→EXPIRED, PAUSED→EXPIRED. EXPIRED is terminal — calling on an already-expired contract returns 400; do NOT retry, do NOT escalate to deleteContract or any other destructive tool as a fallback. Verify contract.status via getContractById before calling. Idempotency: NO. The contract expires at end of day 23:59:59.999999. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling.

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": {
      "contractIds": "<contractIds>"
    },
    "name": "expireContract"
  }
}

Input Schema

NameRequiredDescriptionDefault
contractIdsYesUUIDs of the contracts to expire. Always a list, even for one contract. Pass every contract in one call. Each contract expires independently. The result reports each one.
expiry_dateNoDate to expire the contract (e.g. 2026-12-31). Defaults to today if not provided. Must not be earlier than contract.start_date.
__userContextNoInternal user context for multi-tenant authentication and approval workflow

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.4.2
    • removedInput schema / properties / contractId
      Removed value: -{
      -  "description": "The unique identifier (UUID) of the contract to expire.",
      -  "type": "string"
      -}
    • addedInput schema / properties / contractIds
      Added value: +{
      +  "description": "UUIDs of the contracts to expire. Always a list, even for one contract. Pass every contract in one call. Each contract expires independently. The result reports each one.",
      +  "items": {},
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "contractId"
      -]New value: +[
      +  "contractIds"
      +]
  2. First observedv2.2.4

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: allowed state transitions (ACTIVE→EXPIRED, PAUSED→EXPIRED), terminal-state behavior (400 on already-expired, do not retry, do not escalate to deleteContract), explicit non-idempotency, exact effective time (end of day 23:59:59.999999), and approval-gate expectations including 'do NOT ask the user to re-confirm.' These are precisely the mutation-specific behaviors an agent cannot infer from structured fields.

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 exclusivity claim and the primary trigger, then ordered by decision importance: alternative to avoid, batching rule, state transitions, error handling, verification, idempotency, timing, approval. Dense but every sentence changes agent behavior; the capitalization is used as salience marking rather than 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 destructive, non-idempotent mutation with no annotations and no output schema, the description covers everything needed: valid states, terminal-state failure mode, batch semantics, verification step, and approval-gate handling. Nothing an agent needs in order to call this correctly 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%, so the schema already documents contractIds and expiry_date, establishing a baseline of 3. The description adds meaning beyond it: the end-of-day cutoff time and the note that each contract expires independently, plus the operational rationale for batching all ids into one call. It does not add further syntax detail (date format is left to the schema), so it sits just above baseline.

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?

States a specific verb and resource (expire a contract by adjusting end_date) and explicitly claims exclusivity: 'THE ONLY tool that can expire, end, terminate or cancel contracts.' It names the sibling it must not be confused with (updateContract) and the sibling that must not be used as a fallback (deleteContract), so an agent can route correctly without opening any schema.

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?

Gives explicit when-to-use triggers ('whenever the user wants contracts to stop on a given date, including when they phrase it as update the expiry date'), explicit when-not ('Do NOT use updateContract'), and explicit batch guidance ('pass every id in contractIds on a SINGLE call — never call this tool once per contract'), with the reason (each call raises its own approval dialog and only the most recent can be approved). Prerequisite check via getContractById is also spelled out.

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

Deploy Server

Other Tools