Skip to main content
Glama

query_contract

Retrieve contract details, status, PDF URL, metadata, and signer information for eSignature agreements using a contract ID. Ideal for tracking and managing signed documents.

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

  • The handler logic for the 'query_contract' tool. It performs a GET request to the eSignatures API using the provided contract_id 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()}")]
  • Pydantic/JSON schema defining the input parameters for the 'query_contract' tool, which requires a 'contract_id' string.
    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"], }
  • Tool registration in the @server.list_tools() handler, defining name, description, and inputSchema for 'query_contract'.
    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 ),

Other Tools

Related Tools

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