get_scopes
Retrieve available permission scopes for SendGrid API keys to manage access control and security settings for email operations.
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 SendGrid's scopes endpoint and returning the result as formatted 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:6-9 (schema)The configuration/schema for the get_scopes tool, including title and description used for tool registration.config: { title: "Get Scopes", description: "Get available permission scopes for API keys", },
- src/tools/index.ts:9-17 (registration)Registration of the get_scopes tool by including miscTools in the allTools export, which collects all tools.export const allTools = { ...automationTools, ...campaignTools, ...contactTools, ...mailTools, ...miscTools, ...statsTools, ...templateTools, };
- src/index.ts:21-23 (registration)Final MCP server registration loop that registers the get_scopes tool (via allTools) with its config and handler.for (const [name, tool] of Object.entries(allTools)) { server.registerTool(name, tool.config as any, tool.handler as any); }