Skip to main content
Glama
victor-velazquez-ai

Enterprise MCP Template

create_record

Add new records like customers or invoices to enterprise systems using JSON payloads. This tool enables AI assistants to create structured data entries through standardized API calls.

Instructions

Create a new record in the upstream API.

TEMPLATE: Replace this docstring with your domain-specific documentation. The docstring is shown to AI clients to help them understand when and how to use this tool.

Args: record_type: The type of record to create (e.g., "customer", "invoice") payload: JSON payload for the record. account_id: Account ID (required if not configured on server). base_url: Optional full API URL (overrides account_id).

Returns: Structured response with ok, status_code, data, errors, request_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
record_typeYes
payloadYes
account_idNo
base_urlNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'create_record'. It retrieves the OAuth token, creates an API client, and executes the call.
    async def create_record(
        record_type: str,
        payload: Dict[str, Any],
        account_id: Optional[str] = None,
        base_url: Optional[str] = None,
    ) -> Dict[str, Any]:
        """
        Create a new record in the upstream API.
    
        TEMPLATE: Replace this docstring with your domain-specific documentation.
        The docstring is shown to AI clients to help them understand when and how
        to use this tool.
    
        Args:
            record_type: The type of record to create (e.g., "customer", "invoice")
            payload: JSON payload for the record.
            account_id: Account ID (required if not configured on server).
            base_url: Optional full API URL (overrides account_id).
    
        Returns:
            Structured response with ok, status_code, data, errors, request_id.
        """
        token = _get_oauth_token()
    
        async with _get_client(base_url, account_id) as client:
            response = await client.create_record(
                access_token=token,
                record_type=record_type,
                payload=payload,
                base_url_override=base_url,
            )
            result = _serialize_response(response)
            
            if isinstance(response, RecordResponse):
                result["internal_id"] = response.internal_id
                result["record_link"] = response.record_link
            
            return result
  • The actual HTTP client method that executes the API request to create a record.
    async def create_record(
        self,
        access_token: str,
        record_type: str,
        payload: Dict[str, Any],
        base_url_override: Optional[str] = None,
    ) -> APIResponse:
        """
        Create a new record in the upstream API.
        
        Args:
            access_token: OAuth Bearer token
            record_type: The record type/endpoint name (e.g., "customer", "invoice")
            payload: The record data to create
            base_url_override: Override the base URL for this request
        
        Returns:
            APIResponse with creation result
        """
        base = base_url_override or self._base_url
        url = f"{base}/{record_type}"
        
        logger.info(f"Creating {record_type} record")
        return await self._request_with_retry("POST", url, access_token, json_body=payload)
Behavior2/5

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

With no annotations provided, the description carries full burden but omits critical safety context: no idempotency guarantees, no conflict behavior (what if record exists?), no rate limits, and no auth scope requirements. The Returns section adds value by describing the response structure beyond the existence of an output schema.

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

Conciseness2/5

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

The description wastes prime real estate with meta-commentary ('Replace this docstring with your domain-specific documentation') intended for developers rather than AI agents. While the Args/Returns structure is logical, the template noise undermines front-loading of essential information.

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

Completeness2/5

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

The presence of the TEMPLATE warning indicates incomplete documentation. While the Args section covers parameters and Returns covers output, the description lacks domain specificity (what kind of records? what API?) and operational context (error scenarios, validation rules) expected for a 4-parameter mutation tool.

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

Parameters4/5

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

Despite 0% schema description coverage, the Args section compensates effectively by documenting all 4 parameters with types, optionality logic (account_id 'required if not configured on server'), and usage examples (record_type examples: 'customer', 'invoice'). This is strong compensation for the schema deficiency.

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

Purpose3/5

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

The first sentence states a clear verb-resource pair ('Create a new record'), but the description is polluted with template placeholder text ('TEMPLATE: Replace this docstring...') that signals incomplete implementation. It fails to distinguish from sibling update_record or clarify record creation scope.

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

Usage Guidelines1/5

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

Provides no explicit guidance on when to use create_record versus update_record or execute_query. The only contextual clue is in the account_id parameter description mentioning server configuration, but this is implicit rather than prescriptive guidance.

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