Skip to main content
Glama

query_contract

Retrieve contract details including status, PDF, signer information, and metadata for eSignature management.

Instructions

Responds with the contract details, contract_id, status, final PDF url if present, title, labels, metadata, expiry time if present, and signer details with all signer events (signer events are included only for recent contracts, with rate limiting).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contract_idYesGUID of the contract (draft contracts can't be queried, only sent contracts).

Implementation Reference

  • Handler implementation for the 'query_contract' tool. It performs a GET request to the eSignatures API endpoint `/api/contracts/{contract_id}` using the secret token and returns the response as text content.
    if name == "query_contract": response = await httpxClient.get(f"/api/contracts/{arguments.get('contract_id')}?token={secret_token}") return [types.TextContent(type="text", text=f"Response code: {response.status_code}, response: {response.json()}")]
  • Input schema definition for the 'query_contract' tool, specifying the required 'contract_id' parameter.
    INPUT_SCHEMA_QUERY_CONTRACT = { "type": "object", "properties": { "contract_id": {"type": "string", "description": "GUID of the contract (draft contracts can't be queried, only sent contracts)."}, }, "required": ["contract_id"], }
  • Registration of the 'query_contract' tool in the list_tools handler, defining its name, description, and input schema.
    types.Tool( name="query_contract", description="Responds with the contract details, contract_id, status, final PDF url if present, title, labels, metadata, expiry time if present, and signer details with all signer events (signer events are included only for recent contracts, with rate limiting).", inputSchema=INPUT_SCHEMA_QUERY_CONTRACT ),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/esignaturescom/mcp-server-esignatures'

If you have feedback or need assistance with the MCP directory API, please join our Discord server