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
| Name | Required | Description | Default |
|---|---|---|---|
| resource | Yes | Resource 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); };
- src/handlers/tools_list.ts:29-42 (schema)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.', }, };
- src/handlers/index.ts:16-22 (registration)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, };
- src/handlers/index.ts:11-11 (registration)Imports the listResourceActionsHandler for registration.import { listResourceActionsHandler } from './list_resource_actions.js';
- src/constants.ts:21-21 (helper)Defines the constant string name for the 'list_resource_actions' tool.export const LIST_RESOURCE_ACTIONS_TOOL = 'list_resource_actions';