Skip to main content
Glama
victor-velazquez-ai

Enterprise MCP Template

get_record

Retrieve specific records from enterprise systems by ID, supporting customers, invoices, and other data types with optional related information.

Instructions

Fetch a record from the upstream API by ID.

Args: record_type: The type of record (e.g., "customer", "invoice") record_id: Internal ID of the record. account_id: Account ID (required if not configured on server). base_url: Optional full API URL (overrides account_id). expand_sub_resources: Include full sublist/related data.

Returns: Structured response with record data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
record_typeYes
record_idYes
account_idNo
base_urlNo
expand_sub_resourcesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_record tool handler registered with @mcp.tool() in src/my_mcp_server/server.py. It retrieves the OAuth token, uses a configured API client to fetch the record, and serializes the response.
    async def get_record(
        record_type: str,
        record_id: str,
        account_id: Optional[str] = None,
        base_url: Optional[str] = None,
        expand_sub_resources: bool = False,
    ) -> Dict[str, Any]:
        """
        Fetch a record from the upstream API by ID.
    
        Args:
            record_type: The type of record (e.g., "customer", "invoice")
            record_id: Internal ID of the record.
            account_id: Account ID (required if not configured on server).
            base_url: Optional full API URL (overrides account_id).
            expand_sub_resources: Include full sublist/related data.
    
        Returns:
            Structured response with record data.
        """
        token = _get_oauth_token()
    
        async with _get_client(base_url, account_id) as client:
            response = await client.get_record(
                access_token=token,
                record_type=record_type,
                record_id=record_id,
                base_url_override=base_url,
                expand_sub_resources=expand_sub_resources,
            )
            return _serialize_response(response)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the return value structure ('Structured response with record data') but omits error handling (404 behavior), authentication requirements, rate limits, or caching behavior that would help an agent understand operational constraints.

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 docstring-style format with Args and Returns sections is structured and readable. Every sentence provides value, though the formatting is slightly unconventional for MCP descriptions. Given the zero schema coverage, the verbosity is necessary and appropriate.

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

Completeness4/5

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

Considering the 5 parameters with zero schema coverage, the description successfully documents all inputs. Since an output schema exists, the brief Returns statement is sufficient. It lacks only error scenario documentation to be fully complete for a retrieval operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, making the description's Args section critical. It excellently compensates by documenting all 5 parameters: record_type includes examples ('customer', 'invoice'), account_id explains conditional requirement logic, and base_url clarifies the override relationship to account_id.

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 fetches a record 'by ID' from an upstream API, using specific verb (Fetch) and resource (record). The 'by ID' qualifier helps distinguish it from sibling execute_query, though it doesn't explicitly name the alternative.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus alternatives like execute_query (for queries) or get_record_schema (for metadata). The description only implies usage through the parameter documentation without stating when-not-to-use or prerequisites.

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/victor-velazquez-ai/enterprise-mcp-template'

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