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,
    };
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It fails to disclose behavioral traits: it doesn't indicate if this is a read/write operation, what permissions are needed, potential side effects (e.g., data modification), error handling, or response format. The phrase 'invoke' suggests an action execution but lacks details on consequences or safety, leaving critical gaps for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It is front-loaded and directly addresses the core function, though it lacks depth. While concise, it under-specifies rather than being overly verbose, earning a high score for structure but not full marks due to missing essential details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (3 parameters with nested objects, no annotations, no output schema), the description is incomplete. It doesn't explain what 'invoke' entails, the nature of resources/actions, expected outcomes, or error cases. Without annotations or output schema, the agent lacks crucial information to use the tool effectively, making this inadequate for a general-purpose action tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'payload matching its schema,' which adds minimal context about 'payload' but doesn't explain 'resource' or 'action' parameters. With 3 undocumented parameters and no enums, the description fails to provide meaningful semantics beyond what the bare schema (types and required fields) already offers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Invoke a resource action with a payload matching its schema' restates the tool name ('invoke_resource_action') and title (null) without specifying what 'invoke' means in practice or what types of actions/resources are involved. It distinguishes from siblings like 'get_resource_action_schema' by implying execution rather than retrieval, but remains vague about the actual purpose beyond basic verb+resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description mentions 'payload matching its schema,' which hints at using 'get_resource_action_schema' first, but this is not explicit. There are no exclusions, prerequisites, or clear context for choosing this over sibling tools like 'list_resource_actions' or 'get_resource_action_snippet.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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