Skip to main content
Glama

getContracts

Read-only

List contracts. Omit locationRef and customerRef to list contracts across all locations, or provide one to scope to a location or customer. Call getLocations to list locations, or getLocation to fetch one by locationId. Call getCustomers to list valid customerRef values.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "getContracts"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoCase-insensitive search by contract title, within customerRef or locationRef when given and across the network otherwise.
limitNoMaximum number of contracts per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100.
statusNoFilter by status: 'draft' created and not sent yet, 'issued' sent and waiting for signatures, 'signed' signed by everyone and active, 'declined' a signer declined it or it expired unsigned, 'terminated' ended by an admin after it was signed. Defaults to every status. Comma-separated, one or more of: draft, issued, signed, declined, terminated.
createDateNoFilter by create date (createDate). Provide gte, lte ISO datetimes.
customerRefNoUUID of the customer (membership or company). When set, returns only that customer's contracts.
locationRefNoUUID of the location. When set, returns contracts in that location. Omit both locationRef and customerRef to list contracts across every location of the network.
nextPageTokenNoPagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page.

Output Schema

NameRequiredDescriptionDefault
contractsYes
nextPageTokenNoPass it back as nextPageToken, with the same filters, to get the next page. Absent on the last page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / contracts / items / 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 / contracts / items / 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 / contracts / items / 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

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds the network-wide default scope when both refs are omitted, but says nothing beyond the schema about pagination flow, result ordering, or what a cross-network query costs — minor added value over the 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.

Conciseness4/5

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

Front-loads the verb and resource in a two-word sentence, then the scoping rule, then reference-resolution helpers. Four short sentences with no filler, though the getLocations/getLocation sentence is somewhat tangential to invoking this specific tool.

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?

An output schema exists, so return shape needn't be explained, and all seven optional parameters carry full schema documentation. The description contributes the one thing the schema alone doesn't foreground: the default network-wide scope and how to obtain valid refs. Nothing critical to a correct call is missing.

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 every parameter (q, limit, status, createDate, customerRef, locationRef, nextPageToken) is already documented, including defaults and cap behavior. The description's only semantic addition is the combined-ref-omission rule, which the locationRef schema text also states, so baseline 3 applies.

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?

Opens with a specific verb+resource ("List contracts") and immediately clarifies the scope behavior: omitting locationRef and customerRef lists across all locations, providing one scopes to that location or customer. This is far more precise than a bare list tool, though it never names the singular getContract sibling, so the list-vs-single distinction is left implicit.

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?

Gives explicit inclusion guidance for the two scoping filters and tells the agent how to resolve valid refs by calling getLocations/getLocation/getCustomers. It does not tell the agent when to prefer this over getContract for a single known contract, so the alternative-selection guidance is clear but not complete.

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