Skip to main content
Glama
Seitrace

Seitrace Insights MCP Server

Official
by Seitrace

list_resources

Retrieve available blockchain data resources (ERC-20, ERC-721, native tokens) on the Seitrace Insights MCP Server to query specific on-chain insights and information.

Instructions

List available resources (e.g., insights_erc20, insights_erc721, insights_native).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main execution logic for the list_resources tool. Aggregates resources from all topics using AVAILABLE_TOPICS, generates LLM-friendly descriptions using RESOURCE_DESCRIPTION_MAP or action names, sorts them, and returns as MCP response.
    export const listResourcesHandler = async (_: ToolArgs): Promise<CallToolResult> => {
      /**
       * List all available resources.
       */
      const allResources = await Promise.all(
        AVAILABLE_TOPICS.map(async (topic) => {
          return await topic.getResources();
        })
      );
    
      /**
       * Build an enriched list of resources with short, LLM-friendly descriptions.
       * Description strategy:
       * - Provide a concise action summary (comma-separated action names).
       * - For well-known resources, use more direct phrasing.
       */
      const resources = allResources
        .reduce<{ name: string; description: string }[]>((acc, topicResources) => {
          for (const [name, grouped] of topicResources.entries()) {
            const actionNames = Object.keys(grouped.actions).sort();
            let description: string = '';
    
            description = RESOURCE_DESCRIPTION_MAP[name];
    
            if (!description) {
              // Generic, context-optimized fallback using action names
              const preview = actionNames.slice(0, 6).join(', ');
              const suffix = actionNames.length > 6 ? ', …' : '';
              description = `Actions: ${preview}${suffix}.`;
            }
    
            acc.push({ name, description });
          }
          return acc;
        }, [])
        // Ensure stable ordering
        .sort((a, b) => a.name.localeCompare(b.name));
    
      // Return the list of resources.
      return McpResponse(JSON.stringify({ resources }));
    };
  • Defines the input schema and metadata for the list_resources tool as part of the tools list. No input parameters required.
    const listResource: Tool = {
      name: LIST_RESOURCES_TOOL,
      description:
        'List available resources for Sei blockchain analysis (e.g., insights_erc20, insights_erc721, insights_native, insights_erc1155, smart_contract, general). This is the first step - start here to discover available resources.',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
        additionalProperties: false,
        description: 'No arguments required.',
      },
    };
  • Registers list_resources handler by mapping the tool name to listResourcesHandler function in the central handlerMap used by MCP servers.
    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/constants.ts:20-20 (registration)
    Defines the canonical string name for the list_resources tool, used in schema and handler registrations.
    export const LIST_RESOURCES_TOOL = 'list_resources';
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