get_scopes
Retrieve available API key permission scopes to configure access levels for SendGrid email operations, ensuring proper authorization for marketing and transactional email tasks.
Instructions
Get available permission scopes for API keys
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/misc.ts:10-13 (handler)The handler function that executes the get_scopes tool by making an API request to retrieve available permission scopes from SendGrid and formatting the response as JSON.handler: async (): Promise<ToolResult> => { const result = await makeRequest("https://api.sendgrid.com/v3/scopes"); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; },
- src/tools/misc.ts:5-9 (schema)The schema/configuration for the get_scopes tool, defining its title and description.get_scopes: { config: { title: "Get Scopes", description: "Get available permission scopes for API keys", },
- src/index.ts:21-22 (registration)Registration of all tools, including get_scopes, via server.registerTool in the MCP server setup.for (const [name, tool] of Object.entries(allTools)) { server.registerTool(name, tool.config as any, tool.handler as any);
- src/tools/index.ts:9-17 (registration)Aggregation of all tools including miscTools (which contains get_scopes) into allTools for top-level registration.export const allTools = { ...automationTools, ...campaignTools, ...contactTools, ...mailTools, ...miscTools, ...statsTools, ...templateTools, };