Skip to main content
Glama

Prepare contract document

clm_create_upload_url

User files: after PUT, default to Import contracts with uploadReference for extraction; external record sync: Sync contract from another system. Claude chat: panel first; sandbox PUT needs app-domain permission or no panel. Includes a single-command upload example and transfer safety instructions.

Input Schema

NameRequiredDescriptionDefault
sha256NoLowercase hex SHA-256; import rejects differing bytes
fileNameYesName + extension
fileSizeYesBytes
mimeTypeYesUpload file type; imports accept PDF, DOCX, TXT, JPEG, PNG or RTF

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / fileName / description
      Previous value: -"Original file name including extension"New value: +"Name + extension"
    • changedInput schema / properties / fileSize / description
      Previous value: -"File size in bytes"New value: +"Bytes"
    • changedInput schema / properties / fileSize / maximum
      Previous value: -9007199254740991New value: +52428800
    • changedInput schema / properties / mimeType / description
      Previous value: -"File type of the uploaded document"New value: +"Upload file type; imports accept PDF, DOCX, TXT, JPEG, PNG or RTF"
    • addedInput schema / properties / mimeType / enum
      Added value: +[
      +  "application/pdf",
      +  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      +  "text/plain",
      +  "image/jpeg",
      +  "image/png",
      +  "text/rtf",
      +  "application/rtf"
      +]
    • removedInput schema / properties / mimeType / minLength
      Removed value: -1
    • addedInput schema / properties / sha256
      Added value: +{
      +  "description": "Lowercase hex SHA-256; import rejects differing bytes",
      +  "pattern": "^[a-f0-9]{64}$",
      +  "type": "string"
      +}
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / additionalProperties
      Removed value: -false
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "acceptedMimeTypes": {
      +        "description": "Document types contract imports accept",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
      +          },
      +          {
      +            "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))$"
      +          }
      +        ],
      +        "description": "When uploadUrl stops accepting the file",
      +        "type": "string"
      +      },
      +      "expiresIn": {
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      },
      +      "ifUploadUrlUnreachable": {
      +        "additionalProperties": false,
      +        "description": "Present when contract import is available on this connection",
      +        "properties": {
      +          "kind": {
      +            "const": "inline",
      +            "description": "File kind to send instead",
      +            "type": "string"
      +          },
      +          "maxBytes": {
      +            "description": "Largest inline file in bytes",
      +            "exclusiveMinimum": 0,
      +            "maximum": 9007199254740991,
      +            "type": "integer"
      +          },
      +          "note": {
      +            "description": "How the inline path relates to this upload destination",
      +            "type": "string"
      +          },
      +          "tool": {
      +            "description": "Tool that accepts the same file inline",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "tool",
      +          "kind",
      +          "maxBytes",
      +          "note"
      +        ],
      +        "type": "object"
      +      },
      +      "maxBytes": {
      +        "description": "Largest accepted document size in bytes",
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      },
      +      "method": {
      +        "const": "PUT",
      +        "description": "HTTP method for uploadUrl",
      +        "type": "string"
      +      },
      +      "nextStep": {
      +        "description": "Client-specific document transfer steps",
      +        "type": "string"
      +      },
      +      "note": {
      +        "type": "string"
      +      },
      +      "requiredHeaders": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "description": "Headers the PUT must send with exactly these values",
      +        "properties": {},
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "status": {
      +        "const": "awaiting_upload",
      +        "description": "The reference holds no document until the PUT to uploadUrl succeeds",
      +        "type": "string"
      +      },
      +      "uploadCommand": {
      +        "type": "string"
      +      },
      +      "uploadInstructions": {
      +        "type": "string"
      +      },
      +      "uploadReference": {
      +        "description": "Opaque prepared document reference",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "uploadUrl": {
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "uploadUrl",
      +      "expiresIn",
      +      "uploadCommand",
      +      "uploadInstructions",
      +      "uploadReference",
      +      "status",
      +      "method",
      +      "requiredHeaders",
      +      "expiresAt",
      +      "maxBytes",
      +      "acceptedMimeTypes"
      +    ]
      +  },
      +  {
      +    "additionalProperties": false,
      +    "else": {
      +      "required": [
      +        "action_url"
      +      ]
      +    },
      +    "if": {
      +      "properties": {
      +        "audience": {
      +          "const": "member"
      +        }
      +      }
      +    },
      +    "properties": {
      +      "action_url": {
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "audience": {
      +        "enum": [
      +          "billing_admin",
      +          "member"
      +        ]
      +      },
      +      "code": {
      +        "const": "billing_action_required"
      +      },
      +      "reason": {
      +        "enum": [
      +          "trial_cap_reached",
      +          "trial_ended",
      +          "subscription_ended",
      +          "payment_failed",
      +          "plan_limit_reached",
      +          "storage_full",
      +          "parser_credits_exhausted"
      +        ]
      +      },
      +      "retryable": {
      +        "const": false,
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "reason",
      +      "audience"
      +    ],
      +    "then": {
      +      "not": {
      +        "required": [
      +          "action_url"
      +        ]
      +      }
      +    }
      +  }
      +]
    • removedOutput schema / properties
      Removed value: -{
      -  "expiresIn": {
      -    "description": "Number of seconds until the signed URL expires",
      -    "exclusiveMinimum": 0,
      -    "maximum": 9007199254740991,
      -    "type": "integer"
      -  },
      -  "r2Key": {
      -    "description": "Opaque object key for the uploaded file. Pass this back to `POST /contracts/ingest`.",
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "uploadUrl": {
      -    "description": "Single-use signed URL for HTTP PUT upload",
      -    "minLength": 1,
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "r2Key",
      -  "uploadUrl",
      -  "expiresIn"
      -]
  2. First observed

TDQS

C2.7/5.0
Behavior3/5

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

Annotations already declare write-but-not-destructive, non-idempotent, closed-world behavior; the description adds permission context ('sandbox PUT needs app-domain permission or no panel') and points at transfer safety and sha256 mismatch rejection. It does not state URL lifetime, whether uploads are single-use, or what happens if the PUT is never performed, and the 'includes an example/safety instructions' clause merely promises content instead of delivering it.

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

Conciseness2/5

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

The definition is a semicolon-separated stream of fragments with no topic sentence, and it spends a sentence advertising a 'single-command upload example and transfer safety instructions' that it never provides. Structure is poor: the most important fact (this returns a URL to PUT the document to) is never front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has an output schema, 100% schema coverage, and informative annotations, so a full behavioral account is not required. Still, for an upload-URL generator, the description omits how the URL is used after the call, its expiry, and the handoff path to clm_import_contracts, leaving the workflow ambiguous despite covered parameters.

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% and every property (sha256, fileName, fileSize, mimeType enum) is documented in the schema, so the description carries no additional parameter obligation. It also adds no new meaning about size caps or MIME constraints beyond what the schema already states, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description is a fragment list ('User files: after PUT...; external record sync: ...; Claude chat: panel first') that never states plainly that the tool issues a URL for uploading a contract document. An agent must infer the core purpose from the tool name and the mention of PUT, and sibling confusion (clm_create_upload_session, clm_import_files, clm_create_type_generation_upload_url) is only partly resolved by the scenario hints.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It does give scenario-based routing: user files should default to Import contracts with uploadReference, external systems go to Sync contract, and chat contexts should use the panel first. However, the branches are terse and never name the sibling tools (clm_import_contracts, clm_create_upload_session) explicitly, so the agent has to map the labels to tools itself.

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.