Skip to main content
Glama
esignaturescom

MCP Server for eSignatures

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
    ),
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates key behavioral traits: it's a read operation (implied by 'responds with'), discloses that 'signer events are included only for recent contracts', and explicitly mentions 'rate limiting'. However, it doesn't cover other potential behaviors like error conditions, authentication requirements, or pagination.

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

Conciseness4/5

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

The description is efficiently structured as a single sentence that lists all return fields and includes important behavioral notes. It's appropriately sized for the tool's complexity, though it could be slightly more front-loaded by stating the core purpose more clearly before listing fields.

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?

For a read operation with no annotations and no output schema, the description provides reasonable coverage of what the tool returns and some behavioral constraints. However, it doesn't explain the return format structure, error handling, or provide complete context about the 'recent contracts' limitation. Given the tool's moderate complexity, the description is adequate but has clear gaps.

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?

The schema description coverage is 100% with the single parameter 'contract_id' well-documented in the schema itself. The description doesn't add any parameter-specific information beyond what's already in the schema description. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Responds with the contract details' followed by a specific list of fields returned. It uses the verb 'responds with' and identifies the resource as 'contract details' with specific attributes. However, it doesn't explicitly differentiate from sibling tools like 'list_recent_contracts' or 'query_template' beyond the scope of a single contract query.

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?

The description implies usage context through the mention of 'recent contracts' and 'rate limiting', but doesn't provide explicit guidance on when to use this tool versus alternatives like 'list_recent_contracts' or 'query_template'. The input schema description mentions 'draft contracts can't be queried, only sent contracts', which provides some usage constraint, but this isn't in the main description text.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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