Skip to main content
Glama

Get document download URL

clm_get_contract_document_download_url
Read-onlyIdempotent

Get a short-lived download URL and expiry for the original file or available preview PDF; defaults to the current primary version. Supports prior, draft and related versions. Use clm_read_contract_document for cited text instead of a file download.

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_get_contract_document_download_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesID
fileIdNoFile version ID; omit for current primary
variantNoRetained original or available preview PDForiginal

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / fileId / description
      Previous value: -"Contract file version identifier. Omit to download the current primary version."New value: +"File version ID; omit for current primary"
    • removedInput schema / properties / fileId / 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 / variant / description
      Previous value: -"Original retained file or the available preview PDF"New value: +"Retained original or available preview PDF"
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "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",
      -      "type": "string"
      -    },
      -    "downloadUrl": {
      -      "description": "Short-lived HTTPS URL for the selected document bytes",
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "expiresAt": {
      -      "allOf": [
      -        {
      -          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      -          "type": "string"
      -        },
      -        {
      -          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      -          "type": "string"
      -        }
      -      ],
      -      "description": "When the signed URL stops working (ISO-8601)",
      -      "type": "string"
      -    },
      -    "expiresIn": {
      -      "description": "Number of seconds until the signed URL expires",
      -      "exclusiveMinimum": 0,
      -      "maximum": 9007199254740991,
      -      "type": "integer"
      -    },
      -    "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": "Contract file version UUID",
      -      "type": "string"
      -    },
      -    "fileName": {
      -      "description": "Download file name",
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "isPrimary": {
      -      "description": "Whether the file belongs to the primary document group",
      -      "type": "boolean"
      -    },
      -    "mimeType": {
      -      "description": "MIME type of the selected bytes",
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "status": {
      -      "enum": [
      -        "draft",
      -        "effective",
      -        "superseded"
      -      ],
      -      "type": "string"
      -    },
      -    "variant": {
      -      "enum": [
      -        "original",
      -        "preview"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "downloadUrl",
      -    "expiresAt",
      -    "expiresIn",
      -    "fileName",
      -    "mimeType",
      -    "variant",
      -    "isPrimary",
      -    "status",
      -    "fileId",
      -    "contractId"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the safety profile is covered; the description adds genuinely new behavior — the URL is short-lived and comes with an expiry, and the response resolves to the primary version by default. It stops short of noting auth requirements or what happens when no preview exists, but the key transient-output trait is disclosed.

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 tight sentences with zero filler: the capability and default are front-loaded, and the sibling disambiguation comes last where it belongs. Every clause carries information an agent would otherwise have to infer.

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?

With no output schema, the description still names the return payload (URL and expiry), states the default version resolution, and covers alternative access via a sibling. For a three-parameter read-only tool this leaves nothing an agent needs in order to invoke it correctly.

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 a baseline of 3 applies, but the description adds meaning beyond the schema by explaining that prior, draft, and related versions are addressable via fileId and that 'preview' is only returned when available. That clarifies the accepted domain of the fileId parameter rather than merely restating it.

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 ('Get a short-lived download URL and expiry') plus the exact artifact scope ('original file or available preview PDF'). It also explicitly distinguishes itself from clm_read_contract_document, so an agent can pick between them without inspecting either schema.

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?

Provides a clear routing rule: use this tool for a file download, use clm_read_contract_document when cited text is needed. The 'defaults to the current primary version' plus 'supports prior, draft and related versions' clause also clarifies the version-scoping context, though no explicit when-not or prerequisite conditions are stated.

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.