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
| Name | Required | Description | Default |
|---|---|---|---|
| contract_id | Yes | GUID 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"], }
- src/mcp_server_esignatures/server.py:34-38 (registration)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 ),