Skip to main content
Glama

restful

Execute direct REST API calls to Salesforce to interact with data and metadata, supporting GET, POST, PATCH, and DELETE operations for custom integrations.

Instructions

Makes a direct REST API call to Salesforce

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe path of the REST API endpoint (e.g., 'sobjects/Account/describe')
methodNoThe HTTP method (default: 'GET')GET
paramsNoQuery parameters for the request
dataNoData for POST/PATCH requests

Implementation Reference

  • Handler for the 'restful' tool: extracts arguments, validates, calls sf_client.sf.restful(path, method, params, json=data), and returns formatted JSON result.
    elif name == "restful": path = arguments.get("path") method = arguments.get("method", "GET") params = arguments.get("params") data = arguments.get("data") if not path: raise ValueError("Missing 'path' argument") if not sf_client.sf: raise ValueError("Salesforce connection not established.") results = sf_client.sf.restful(path, method=method, params=params, json=data) return [ types.TextContent( type="text", text=f"RESTful API Call Result (JSON):\n{json.dumps(results, indent=2)}", ) ]
  • Registration of the 'restful' tool in handle_list_tools(), defining its name, description, and input schema for path (required), method, params, data.
    types.Tool( name="restful", description="Makes a direct REST API call to Salesforce", inputSchema={ "type": "object", "properties": { "path": { "type": "string", "description": "The path of the REST API endpoint (e.g., 'sobjects/Account/describe')", }, "method": { "type": "string", "description": "The HTTP method (default: 'GET')", "enum": ["GET", "POST", "PATCH", "DELETE"], "default": "GET", }, "params": { "type": "object", "description": "Query parameters for the request", "properties": {}, "additionalProperties": True, }, "data": { "type": "object", "description": "Data for POST/PATCH requests", "properties": {}, "additionalProperties": True, }, }, "required": ["path"], }, ),

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

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