Skip to main content
Glama
smn2gnt

MCP Salesforce Connector

by smn2gnt

tooling_execute

Execute Tooling API requests to interact with Salesforce data, supporting GET, POST, PATCH, and DELETE operations for dynamic data management.

Instructions

Executes a Tooling API request

Input Schema

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

Implementation Reference

  • Handler for the 'tooling_execute' tool within the @server.call_tool() function. Extracts action, method, and data arguments, validates them, and invokes the Salesforce Tooling API via sf_client.sf.toolingexecute(). Returns the result as formatted JSON text content.
    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)}",
            )
        ]
  • Registration of the 'tooling_execute' tool in the @server.list_tools() function, including its description and JSON schema for input validation (action required, optional method and data).
    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"],
        },
    ),
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 provides almost none. 'Executes a Tooling API request' implies a write operation could occur (depending on method), but doesn't disclose authentication requirements, rate limits, side effects, or what happens on success/failure. The description doesn't even mention that this supports multiple HTTP methods (GET, POST, PATCH, DELETE) which is critical behavioral information.

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 at just 5 words. While this conciseness comes at the expense of helpful information, the description doesn't waste words or include unnecessary fluff. Every word contributes to the minimal statement of purpose, making it structurally efficient if not informative.

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?

For a tool with 3 parameters, no annotations, no output schema, and complex sibling relationships, the description is severely incomplete. It doesn't explain what the Tooling API is, what kinds of operations it supports, when to use it versus other tools, or what to expect as output. The agent would struggle to use this tool effectively based solely on the description.

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%, so the schema already fully documents all three parameters. The description adds no parameter information beyond what's in the schema - it doesn't explain what 'action' represents in practical terms, what 'data' should contain, or when different 'method' values are appropriate. With complete schema coverage, the baseline score of 3 is appropriate.

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 a tautology that essentially restates the tool name 'tooling_execute'. While it mentions the Tooling API, it doesn't specify what kind of operations this enables or what resources it acts upon. It fails to distinguish this tool from sibling tools like 'restful' or 'apex_execute' that might also execute API requests.

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?

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools that appear to handle data operations (create_record, delete_record, get_record, update_record) and query operations (run_soql_query, run_sosl_search), but the description gives no indication of when this generic Tooling API execution tool is appropriate versus those more specific tools.

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

Related 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/smn2gnt/MCP-Salesforce'

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