Skip to main content
Glama

list_assets

Retrieve comprehensive cryptocurrency market data to access real-time prices and asset information for analysis and tracking.

Instructions

Get all available crypto assets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `toolCall` method that executes the tool logic: fetches crypto assets data from the Coincap API endpoint and returns it as JSON string in the response content.
    toolCall = async () => {
      try {
        const url = CONSTANTS.CRYPTO_PRICE_URL;
    
        const response = await fetch(url);
        if (!response.ok) {
          throw new Error("Error fetching coincap data");
        }
    
        const body = await response.json();
    
        return {
          content: [{ type: "text", text: JSON.stringify(body.data) }],
        };
      } catch (error) {
        return {
          content: [
            { type: "error", text: JSON.stringify((error as any).message) },
          ],
        };
      }
    };
  • The tool name and `toolDefinition` object defining the schema, description, and empty input schema for the list_assets tool.
    name = "list_assets";
    toolDefinition: Tool = {
      name: this.name,
      description: "Get all available crypto assets",
      inputSchema: {
        type: "object",
      },
    };
  • src/index.ts:60-69 (registration)
    Dynamically loads all available tools (including list_assets via toolLoader) and creates the `toolsMap` registry used by the MCP server's ListTools and CallTool handlers.
    const tools = await loadTools();
    if (tools.length === 0) {
      console.error("No tools were loaded! Server may not function correctly.");
    }
    
    toolsMap = createToolsMap(tools);
    console.log(
      `Initialized with ${tools.length} tools:`,
      Array.from(toolsMap.keys()).join(", ")
    );
  • src/index.ts:40-54 (registration)
    MCP server request handler for calling tools: retrieves the tool instance from the registry by name and invokes its `toolCall` method.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      if (!toolsMap) {
        throw new Error("Tools not initialized");
      }
    
      const tool = toolsMap.get(request.params.name);
      if (!tool) {
        throw new Error(
          `Unknown tool: ${request.params.name}. Available tools: ${Array.from(
            toolsMap.keys()
          ).join(", ")}`
        );
      }
      return tool.toolCall(request);
    });
  • Helper function that dynamically scans the tools directory, imports and instantiates tool classes (like ListAssetsTool), validating they have required properties before adding to the tools list.
    export async function loadTools(): Promise<BaseTool[]> {
      try {
        const toolsPath = await findToolsPath();
        const files = await fs.readdir(toolsPath);
        const tools: BaseTool[] = [];
    
        for (const file of files) {
          if (!isToolFile(file)) {
            continue;
          }
    
          try {
            const modulePath = `file://${join(toolsPath, file)}`;
            const { default: ToolClass } = await import(modulePath);
    
            if (!ToolClass) {
              continue;
            }
    
            const tool = new ToolClass();
    
            if (
              tool.name &&
              tool.toolDefinition &&
              typeof tool.toolCall === "function"
            ) {
              tools.push(tool);
            }
          } catch (error) {
            console.error(`Error loading tool from ${file}:`, error);
          }
        }
    
        return tools;
      } catch (error) {
        console.error(`Failed to load tools:`, error);
        return [];
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Get all available crypto assets' but doesn't explain what 'available' means (e.g., supported by the API, currently tradable), whether it's a read-only operation, if there are rate limits, or what the response format looks like. This leaves significant gaps for a tool with zero annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence with no wasted words. It's appropriately sized for a simple tool and front-loads the key information directly.

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 tool's simplicity (0 parameters, no output schema, no annotations), the description is minimal. It states what the tool does but lacks context on usage versus siblings, behavioral details like response format or constraints, and doesn't leverage the opportunity to provide more guidance. For a tool in a server with sibling tools, this is inadequate.

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

Parameters4/5

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

The tool has 0 parameters, and the schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and a baseline score of 4 is appropriate for a parameterless tool where the schema fully covers the input structure.

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

Purpose4/5

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

The description clearly states the action ('Get') and resource ('all available crypto assets'), providing a specific purpose. However, it doesn't differentiate from sibling tools like 'bitcoin_price' or 'get_crypto_price' which appear to be more specific price-fetching tools, so it doesn't fully distinguish from alternatives.

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?

The description provides no guidance on when to use this tool versus the sibling tools ('bitcoin_price' and 'get_crypto_price'). It doesn't specify if this is for listing assets versus getting prices, or any prerequisites or exclusions for usage.

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

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/QuantGeekDev/coincap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server