Skip to main content
Glama

Read contract document

clm_read_contract_document
Read-onlyIdempotent

Read a known contract document as cited text sections with a continuation cursor. Use clm_search_contract_documents to locate clauses across documents, or clm_get_contract_analysis for extracted insights.

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": {
      "id": "<id>"
    },
    "name": "clm_read_contract_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesID
limitNoMaximum text length
cursorNoPrior read cursor
documentIdNoEffective primary or related document ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / cursor / description
      Previous value: -"Continuation cursor from a prior read"New value: +"Prior read cursor"
    • changedInput schema / properties / documentId / description
      Previous value: -"Optional effective primary or related document identifier"New value: +"Effective primary or related document ID"
    • removedInput schema / properties / documentId / pattern
      Removed value: -"^([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)$"
    • changedInput schema / properties / id / description
      Previous value: -"Contract identifier"New value: +"ID"
    • removedInput schema / properties / id / pattern
      Removed value: -"^([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)$"
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum document text to return"New value: +"Maximum text length"
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "completeness": {
      -      "enum": [
      -        "complete",
      -        "partial"
      -      ],
      -      "type": "string"
      -    },
      -    "items": {
      -      "description": "Document text with citations",
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "citation": {
      -            "additionalProperties": false,
      -            "description": "Source citation for this text",
      -            "properties": {
      -              "chunkId": {
      -                "anyOf": [
      -                  {
      -                    "allOf": [
      -                      {
      -                        "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"
      -                      },
      -                      {
      -                        "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"
      -                      }
      -                    ],
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "citationId": {
      -                "description": "Stable evidence citation identifier",
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "contractId": {
      -                "allOf": [
      -                  {
      -                    "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"
      -                  },
      -                  {
      -                    "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"
      -                  }
      -                ],
      -                "description": "Contract UUID containing the cited passage",
      -                "type": "string"
      -              },
      -              "contractTitle": {
      -                "description": "Contract title at the cited passage",
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "endOffset": {
      -                "anyOf": [
      -                  {
      -                    "maximum": 9007199254740991,
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "fileId": {
      -                "allOf": [
      -                  {
      -                    "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"
      -                  },
      -                  {
      -                    "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"
      -                  }
      -                ],
      -                "description": "Effective document version UUID containing the passage",
      -                "type": "string"
      -              },
      -              "fileName": {
      -                "description": "Document file name",
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "fileRole": {
      -                "enum": [
      -                  "primary",
      -                  "related"
      -                ],
      -                "type": "string"
      -              },
      -              "fileStatus": {
      -                "const": "effective",
      -                "type": "string"
      -              },
      -              "startOffset": {
      -                "anyOf": [
      -                  {
      -                    "maximum": 9007199254740991,
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              }
      -            },
      -            "required": [
      -              "citationId",
      -              "contractId",
      -              "contractTitle",
      -              "fileId",
      -              "chunkId",
      -              "fileName",
      -              "fileRole",
      -              "fileStatus",
      -              "startOffset",
      -              "endOffset"
      -            ],
      -            "type": "object"
      -          },
      -          "content": {
      -            "description": "Matched or sequential document text",
      -            "type": "string"
      -          },
      -          "context": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          }
      -        },
      -        "required": [
      -          "content",
      -          "citation"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "nextCursor": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "status": {
      -      "enum": [
      -        "ok",
      -        "missing",
      -        "ambiguous",
      -        "processing",
      -        "unindexed",
      -        "no_match",
      -        "exhausted",
      -        "invalid_cursor"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "status",
      -    "completeness",
      -    "items",
      -    "nextCursor"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the description's job is to add what annotations cannot. It does that by disclosing the paginated read model (sections plus a continuation cursor) and by noting the result is 'cited' text. It stops short of saying exactly what happens when the text-length limit is reached or how sections are delimited.

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?

Two sentences, zero filler: the capability and its return shape come first, the disambiguation second. Every clause earns its place.

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 read-only, four-parameter tool with full schema coverage and no output schema, the definition covers purpose, routing, and the pagination contract adequately. The remaining gap is the id vs documentId resolution and truncation behavior, which an agent may need in practice.

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 the baseline is 3. The phrase 'continuation cursor' adds a little meaning to the cursor parameter beyond 'Prior read cursor', but the description does nothing to clarify the ambiguous distinction between the required 'id' and 'documentId' ('Effective primary or related document ID') — the one parameter relationship an agent could genuinely get wrong.

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?

The description states a specific verb and resource ('Read a ... contract document') and even characterizes the return shape ('cited text sections with a continuation cursor'), which lets an agent distinguish it from search- or analysis-oriented siblings without opening a 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?

It gives the selecting condition ('known contract document', i.e. you already have the ID) and routes two nearby but different intents explicitly: clm_search_contract_documents for locating clauses across documents and clm_get_contract_analysis for extracted insights. Nothing is left to inference about which tool to pick.

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.