Skip to main content
Glama
Seitrace

Seitrace Insights MCP Server

Official
by Seitrace

list_resource_actions

Retrieve all available actions for a specified resource using the Seitrace Insights MCP Server. This tool enables efficient access to blockchain data by listing actions associated with a given resource name.

Instructions

List actions for a given resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resourceYesResource name.

Implementation Reference

  • The primary handler function for the 'list_resource_actions' tool. It resolves the topic from the resource name, validates the resource exists, and delegates to the topic's listResourceActions method.
    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);
    };
  • The Tool object definition including name, description, and inputSchema for the 'list_resource_actions' tool, used in tool listing.
    const listResourceActions: Tool = {
      name: LIST_RESOURCE_ACTIONS_TOOL,
      description:
        'List available actions for a given resource (step 2). Each action will show a brief description, but you MUST use get_resource_action_schema to see the exact parameter requirements before invoking.',
      inputSchema: {
        type: 'object',
        properties: {
          resource: { type: 'string', description: 'Resource name from list_resources output.' },
        },
        required: ['resource'],
        additionalProperties: false,
        description: 'Provide the resource name.',
      },
    };
  • Registers the listResourceActionsHandler for the LIST_RESOURCE_ACTIONS_TOOL name in the central handlerMap.
    export const handlerMap = {
      [LIST_RESOURCES_TOOL]: listResourcesHandler,
      [LIST_RESOURCE_ACTIONS_TOOL]: listResourceActionsHandler,
      [GET_RESOURCE_ACTION_SCHEMA_TOOL]: getResourceActionSchemaHandler,
      [GET_RESOURCE_ACTION_SNIPPET_TOOL]: getResourceActionSnippetHandler,
      [INVOKE_RESOURCE_ACTION_TOOL]: invokeResourceActionHandler,
    };
  • Imports the listResourceActionsHandler for registration.
    import { listResourceActionsHandler } from './list_resource_actions.js';
  • Defines the constant string name for the 'list_resource_actions' tool.
    export const LIST_RESOURCE_ACTIONS_TOOL = 'list_resource_actions';
Install Server

Other Tools

Related Tools

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