Skip to main content
Glama
victor-velazquez-ai

Enterprise MCP Template

update_record

Modify existing records in enterprise systems like Salesforce or NetSuite by specifying record type, ID, and field updates. This tool handles API integration and authentication for data management tasks.

Instructions

Update an existing record in the upstream API.

Args: record_type: The type of record (e.g., "customer", "invoice") record_id: Internal ID of the record. updates: Dictionary of fields to update. account_id: Account ID (required if not configured on server). base_url: Optional full API URL (overrides account_id).

Returns: Structured response with update result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
record_typeYes
record_idYes
updatesYes
account_idNo
base_urlNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'update_record', which accepts user input and calls the API client.
    async def update_record(
        record_type: str,
        record_id: str,
        updates: Dict[str, Any],
        account_id: Optional[str] = None,
        base_url: Optional[str] = None,
    ) -> Dict[str, Any]:
        """
        Update an existing record in the upstream API.
    
        Args:
            record_type: The type of record (e.g., "customer", "invoice")
            record_id: Internal ID of the record.
            updates: Dictionary of fields to update.
            account_id: Account ID (required if not configured on server).
            base_url: Optional full API URL (overrides account_id).
    
        Returns:
            Structured response with update result.
        """
        token = _get_oauth_token()
    
        async with _get_client(base_url, account_id) as client:
            response = await client.update_record(
                access_token=token,
                record_type=record_type,
                record_id=record_id,
                payload=updates,
                base_url_override=base_url,
  • The actual implementation of the update_record logic that performs the PATCH request to the API.
    async def update_record(
        self,
        access_token: str,
        record_type: str,
        record_id: str,
        payload: Dict[str, Any],
        base_url_override: Optional[str] = None,
    ) -> APIResponse:
        """
        Update an existing record (partial update via PATCH).
        
        Args:
            access_token: OAuth Bearer token
            record_type: The record type/endpoint name
            record_id: The record's internal ID
            payload: Fields to update
            base_url_override: Override the base URL
        """
        base = base_url_override or self._base_url
        url = f"{base}/{record_type}/{record_id}"
        
        logger.info(f"Updating {record_type} #{record_id}")
        return await self._request_with_retry("PATCH", url, access_token, json_body=payload)
Behavior2/5

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

No annotations provided, so description carries full burden of behavioral disclosure. Fails to specify critical mutation traits: whether updates are partial (PATCH) or full replacement (PUT), what happens if record_id doesn't exist, idempotency guarantees, or error handling behavior. Only mentions 'Structured response' without behavioral context.

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?

Well-organized docstring format with clear Args and Returns sections. Front-loads the core purpose in the first sentence. No redundant or filler text, though 'upstream API' could be more specific.

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?

Adequate for parameter documentation given the input schema lacks descriptions, and output schema exists so return values need minimal explanation. However, as a mutation tool with zero annotations, it lacks important operational context regarding failure modes, authentication requirements, and update semantics that would be necessary for safe invocation.

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?

Excellent compensation for 0% schema description coverage. The Args section documents all 5 parameters including helpful examples (e.g., 'customer', 'invoice' for record_type), conditional requirement logic for account_id, and the override relationship between base_url and account_id. Only minor gap is lack of detail on valid values within the updates dictionary.

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?

States 'Update an existing record' with clear verb and resource type. The phrase 'existing record' usefully distinguishes from sibling create_record. However, 'upstream API' is vague jargon that doesn't specify the domain or system being interacted with.

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?

Provides no explicit guidance on when to select this tool versus create_record or other alternatives. Missing crucial prerequisite context such as 'use only when record exists' or guidance on how to check existence via get_record first.

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