Skip to main content
Glama
Zenskar MCP Server

Zenskar MCP Server

Official
by zenskar

updateContract

updateContract

Update an existing contract by first fetching it, then sending all required fields and phases; call expireContract instead to end or cancel a contract.

Instructions

Update an existing contract. This is a PUT endpoint — you MUST fetch the contract first with getContractById, then send ALL required fields including phases. Without phases the API returns 500. Copy phases from the GET response (each phase needs name, start_date, end_date at minimum). Renewal: renew_with_default_contract, renew_with_existing, do_not_renew. EXPIRY: this tool CANNOT expire, end, terminate or cancel a contract. Contract status is derived from the CONTRACT-LEVEL end_date; phase end_dates never affect it. If the user asks to expire/end/terminate/cancel a contract, or to 'set' or 'update' its expiry date, you MUST call expireContract instead of this tool — it sets the end_date and also prunes future phases, trims overlapping phases and caps product dates, which this tool does not. Setting a past end_date here is rejected.

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": "<name>",
      "status": "<status>",
      "currency": "<currency>",
      "start_date": "<start_date>",
      "customer_id": "<customer_id>"
    },
    "name": "updateContract"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable name for the contract.
tagsNoList of tags for categorizing and filtering contracts.
phasesNoArray of contract phases. Each phase needs at minimum: name, start_date, end_date. Include pricings array if the phase has pricing. Defaults to empty array if omitted.
sourceNoMetadata about the originating system (e.g. {source_type: 'hubspot', source_id: 'deal_123'}).
statusYesContract status: draft, active, paused, or disputed. 'expired' is not settable here — it is derived from contract-level end_date. Use expireContract to expire a contract.
currencyYesThree-letter ISO 4217 currency code (e.g. USD, EUR, GBP).
end_dateNoContract end date in ISO 8601 format. Drives the effective contract status: a past end_date makes the contract read as EXPIRED. Leave null for an open-ended contract. Prefer expireContract over setting a past end_date here.
contractIdYesThe unique identifier (UUID) of the contract to update.
start_dateYesContract start date in ISO 8601 format (e.g. 2026-01-01T00:00:00).
anchor_dateNoReference date for billing cycle calculations.
customer_idYesUUID of the customer associated with this contract.
descriptionNoDetailed description of the contract terms.
__userContextNoInternal user context for multi-tenant authentication and approval workflow
contract_linkNoURL to external contract document or signed agreement.
renewal_policyNoContract renewal behavior: renew_with_default_contract, renew_with_existing, or do_not_renew.
custom_attributesNoKey-value pairs for organization-specific metadata (e.g. automatic_renewal flag).
include_in_renewalNoWhen true, this contract is eligible for renewal processes.
bill_parent_customerNoWhen true and customer has a parent relationship, invoices are sent to the parent.
is_last_day_of_monthNoWhen true, billing cycles always end on the last day of the month.
invoice_payer_customer_idNoOptional customer UUID who will receive and pay invoices for this contract.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.4.2
    • changedInput schema / properties / end_date / description
      Previous value: -"Contract end date in ISO 8601 format."New value: +"Contract end date in ISO 8601 format. Drives the effective contract status: a past end_date makes the contract read as EXPIRED. Leave null for an open-ended contract. Prefer expireContract over setting a past end_date here."
    • changedInput schema / properties / status / description
      Previous value: -"Contract status: draft, active, paused, or disputed. Cannot set to 'expired' via update."New value: +"Contract status: draft, active, paused, or disputed. 'expired' is not settable here — it is derived from contract-level end_date. Use expireContract to expire a contract."
  2. First observedv2.2.4

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so unusually well: it discloses the 500 failure mode when phases are omitted, the need to copy phases from the GET response, the derived-status rule (contract-level end_date governs, phase end_dates do not), and the rejection of past end_dates. It also explains what expireContract does that this tool does not (prunes future phases, trims overlaps, caps product dates), which is genuine behavioral context rather than restatement.

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

Conciseness4/5

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

Front-loaded with the operation and its prerequisite, then the expire warning, then the failure modes — good priority ordering. It is dense and slightly repetitive about expiry (the README-style "CANNOT expire" block, the MUST-call-expireContract sentence, and the past-end_date rejection line each restate part of the same constraint), costing a small amount of efficiency.

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 20-parameter mutation with nested phases, no annotations, and no output schema, the description covers the highest-severity traps (500 on missing phases, wrong tool for expiry, past-end_date rejection) that would otherwise cause silent failures. The gap is replacement semantics for optional fields omitted from the payload, which matters a great deal for a PUT endpoint but is not addressed.

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 baseline is 3, but the description adds cross-field meaning the schema cannot: the minimum required fields per phase (name, start_date, end_date), the requirement to round-trip phases from GET, and the semantic coupling between end_date and observable status. It does not explain whether omitted optional fields (tags, custom_attributes, pricings) are cleared on a PUT, which is the main remaining ambiguity.

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 ("Update an existing contract") and immediately pins down the HTTP-style semantics (PUT, full-payload replacement) that distinguish it from createContract and expireContract. An agent can identify the tool's role 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 Guidelines5/5

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

Gives an explicit prerequisite (fetch with getContractById first), an explicit exclusion ("this tool CANNOT expire, end, terminate or cancel"), and names the correct alternative (expireContract) for the excluded intents, including the tricky "set/update expiry date" phrasing. Also flags renewal_policy values as supporting context.

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