Skip to main content
Glama
Seitrace

Seitrace Insights MCP Server

Official
by Seitrace

invoke_resource_action

Trigger specific operations on blockchain resources by providing a resource, action, and payload. Enables interaction with blockchain data through the Seitrace Insights MCP Server for querying token details, transactions, and smart contracts.

Instructions

Invoke a resource action with a payload matching its schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
payloadYes
resourceYes

Implementation Reference

  • The primary handler function for the 'invoke_resource_action' tool. It extracts resource and action from toolArgs, locates the corresponding resource using TOPIC_KEY_MAP, validates existence and action availability, and delegates execution to the resource's invokeResourceAction method.
    export const invokeResourceActionHandler = async ( toolArgs: ToolArgs, overrideApiKey?: string ): Promise<CallToolResult> => { const { resource, action } = 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) || !(await foundResource.hasResourceAction(resource, action!)) ) { return McpResponse( JSON.stringify({ error: `Unknown or missing resource '${resource}' or action '${action}'.` }) ); } /** * List actions for the resource */ return foundResource.invokeResourceAction(toolArgs, overrideApiKey); };
  • Defines the Tool object for 'invoke_resource_action', including its name, description, and inputSchema specifying required properties: resource (string), action (string), payload (object).
    const invokeResourceAction: Tool = { name: INVOKE_RESOURCE_ACTION_TOOL, description: 'Invoke a resource action with the exact payload structure (step 4 - final step). IMPORTANT: You must first call get_resource_action_schema to determine the correct payload structure. Parameter names from action descriptions may differ from actual schema requirements.', inputSchema: { type: 'object', properties: { resource: { type: 'string' }, action: { type: 'string' }, payload: { type: 'object', additionalProperties: true }, }, required: ['resource', 'action', 'payload'], additionalProperties: false, description: 'Provide resource, action, and payload object matching the schema from get_resource_action_schema.', }, };
  • Registers all tool handlers in a map, specifically mapping INVOKE_RESOURCE_ACTION_TOOL to invokeResourceActionHandler for dispatch.
    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, };

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