Skip to main content
Glama
Seitrace

Seitrace Insights MCP Server

Official
by Seitrace
list_resource_actions.ts954 B
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { TOPIC_KEY_MAP } from '../topics/index.js'; import { ToolArgs } from '../topics/base.js'; import { McpResponse } from '../utils/index.js'; /** * List actions for a specific resource * @param toolArgs - The arguments for the tool * @returns A list of actions for the specified resource */ export const listResourceActionsHandler = 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.listResourceActions(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