Skip to main content
Glama
ampcome-mcps

MCP Salesforce Connector

by ampcome-mcps

tooling_execute

Execute Tooling API requests to manage Salesforce metadata and development tools programmatically through specified endpoints and HTTP methods.

Instructions

Executes a Tooling API request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesThe Tooling API endpoint to call (e.g., 'sobjects/ApexClass')
methodNoThe HTTP method (default: 'GET')GET
dataNoData for POST/PATCH requests

Implementation Reference

  • Registration of the 'tooling_execute' tool including its name, description, and JSON schema for input validation.
    types.Tool(
        name="tooling_execute",
        description="Executes a Tooling API request",
        inputSchema={
            "type": "object",
            "properties": {
                "action": {
                    "type": "string",
                    "description": "The Tooling API endpoint to call (e.g., 'sobjects/ApexClass')",
                },
                "method": {
                    "type": "string",
                    "description": "The HTTP method (default: 'GET')",
                    "enum": ["GET", "POST", "PATCH", "DELETE"],
                    "default": "GET",
                },
                "data": {
                    "type": "object",
                    "description": "Data for POST/PATCH requests",
                    "properties": {},
                    "additionalProperties": True,
                },
            },
            "required": ["action"],
        },
    ),
  • The execution handler for the 'tooling_execute' tool. Parses arguments, validates inputs, calls the Salesforce Tooling API via simple-salesforce library, and returns the JSON-formatted result.
    elif name == "tooling_execute":
        action = arguments.get("action")
        method = arguments.get("method", "GET")
        data = arguments.get("data")
    
        if not action:
            raise ValueError("Missing 'action' argument")
        if not sf_client.sf:
            raise ValueError("Salesforce connection not established.")
    
        results = sf_client.sf.toolingexecute(action, method=method, data=data)
        return [
            types.TextContent(
                type="text",
                text=f"Tooling Execute Result (JSON):\n{json.dumps(results, indent=2)}",
            )
        ]
Behavior2/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 but fails to do so. It does not indicate whether this is a read-only or mutative operation, what permissions or authentication are required, potential rate limits, or error handling. The term 'executes' implies action but lacks detail on consequences, leaving the agent with insufficient context for safe invocation.

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

Conciseness5/5

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

The description is extremely concise with a single sentence, 'Executes a Tooling API request', which is front-loaded and wastes no words. While it lacks detail, every part of the sentence contributes to stating the tool's function, making it efficient in structure without unnecessary elaboration.

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?

Given the complexity of executing API requests with 3 parameters, no annotations, and no output schema, the description is incomplete. It does not explain what the Tooling API is, what to expect in responses, or how errors might be handled. For a tool that likely involves network calls and data manipulation, this minimal description fails to provide adequate context for an agent to use it effectively.

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 input schema has 100% description coverage, clearly documenting parameters like 'action', 'method', and 'data'. The description adds no additional meaning beyond this, as it does not explain parameter relationships or usage examples. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema adequately handles parameter semantics without description enhancement.

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

Purpose2/5

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

The description 'Executes a Tooling API request' is tautological—it essentially restates the tool name 'tooling_execute' without specifying what the Tooling API is or what kind of operations it performs. It lacks a specific verb-resource combination (e.g., 'call Salesforce Tooling API endpoints') and does not distinguish this tool from siblings like 'restful' or 'apex_execute', leaving its purpose vague.

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?

No guidance is provided on when to use this tool versus alternatives. It does not mention context, prerequisites, or exclusions, nor does it reference sibling tools like 'restful' (which might handle general REST calls) or 'apex_execute' (for Apex execution). This absence of usage instructions makes it misleading for an agent trying to select the correct tool.

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/ampcome-mcps/salesforce-mcp'

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