Skip to main content
Glama
Seitrace

Seitrace Insights MCP Server

Official
by Seitrace
get_resource_action_schema.ts976 B
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { ToolArgs } from '../topics/base.js'; import { TOPIC_KEY_MAP } from '../topics/index.js'; import { McpResponse } from '../utils/index.js'; /** * Handles the 'getResourceActionSchema' tool request * @param toolArgs - The arguments provided to the tool * @returns The result of the tool execution */ export const getResourceActionSchemaHandler = async ( toolArgs: ToolArgs ): Promise<CallToolResult> => { const { resource } = toolArgs; const topicKey = resource.split('_')[0]; const foundResource = TOPIC_KEY_MAP[topicKey] || TOPIC_KEY_MAP[resource]; /** * Check if the resource exists */ if (!foundResource || !(await foundResource.getResources()).has(resource)) { return McpResponse(JSON.stringify({ error: `Unknown or missing resource '${resource}'.` })); } /** * List actions for the resource */ return foundResource.getResourceActionSchema(toolArgs); };

Implementation Reference

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/Seitrace/seitrace-mcp'

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