Skip to main content
Glama
sudhakar6

Salesforce MCP Server

by sudhakar6

sf_call_apex_rest

Invoke any custom Apex REST endpoint in Salesforce by specifying the HTTP method and URL mapping path. Pass-through calls to @RestResource Apex classes enable org-specific capabilities.

Instructions

Call a custom Apex REST endpoint exposed by the org.

For any org-specific capability beyond this server's built-in standard-API tools: an Apex class annotated @RestResource(urlMapping=...) with @HttpGet/@HttpPost/etc. methods. path is that class's URL mapping, e.g. "/MyApi/v1/accounts/001xx0000000001AAA" for a class registered with @RestResource(urlMapping='/MyApi/v1/accounts/*'). method must match whichever HTTP method the class handles.

This is a thin, generic pass-through — it has no idea what any particular custom endpoint does, expects, or returns; that's between the caller and whatever the org's Apex class implements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNo
pathYes
methodYes
paramsNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/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. It is candid that this is a 'thin, generic pass-through' with no knowledge of what a custom endpoint expects or returns. It also warns that behavior is entirely dependent on the org's Apex class, preventing an agent from assuming the tool provides validation or endpoint-specific handling.

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 description is front-loaded with the core purpose, then gives a concrete path example, then closes with an honest pass-through warning. Each sentence earns its place, though the middle section could be tightened slightly without losing clarity.

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?

For a deliberately generic pass-through tool, the description covers the essential knowledge an agent needs: the use case, how to construct the path, the HTTP method constraint, and the limitation that endpoint-specific behavior is unknown. The main gap is that `body` and `params` are not explicitly defined, but the tool's generic nature makes that less critical than it would be for a domain-specific API.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaningful semantics for `path` by giving a concrete `@RestResource` URL mapping example, and for `method` by tying it to the Apex class's HTTP handler. However, `body` and `params` are left unexplained; the agent must infer whether `params` means query parameters, headers, or something else.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'Call a custom Apex REST endpoint exposed by the org.' It also clearly contrasts this tool with the server's built-in standard-API tools, making it easy to distinguish from the sibling CRUD and query tools even without opening their schemas.

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

Usage Guidelines4/5

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

The description states when this tool is appropriate: for any org-specific capability beyond the built-in standard-API tools. It explains that `path` is the `@RestResource` URL mapping and that `method` must match the HTTP method handled by the Apex class. It does not explicitly name alternative sibling tools or give exclusion rules, but the intended use case is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/sudhakar6/salesforce-mcp-server'

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