Skip to main content
Glama

list-available-tools

Read-onlyIdempotent

Retrieve and organize all available tools from connected MCP servers for toolset creation. Access detailed metadata and reference tools using 'namespacedName' or 'refId' for streamlined integration.

Instructions

Discover all tools available from connected MCP servers. Returns structured data showing tools grouped by server for toolset creation. Tools can be referenced by 'namespacedName' (e.g., 'git.status') or 'refId' (unique hash). Example: Call with no parameters to see all tools organized by server with detailed metadata for each tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
summaryYesHigh-level statistics about available tools
toolsByServerYesTools organized by their source server

Implementation Reference

  • Handler function that executes the tool logic: formats available tools from toolsetManager if discovery available, else returns error. Returns both text (JSON) and structured content.
    handler: async (
      // eslint-disable-next-line @typescript-eslint/no-unused-vars
      args: any
    ) => {
      if (deps.discoveryEngine) {
        const structured = deps.toolsetManager.formatAvailableTools();
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(structured),
            },
          ],
          structuredContent: structured,
        };
      } else {
        return {
          content: [
            {
              type: "text",
              text: "❌ **Tool discovery not available**\n\nDiscovery engine is not initialized. Server may not be fully started.",
            },
          ],
          isError: true,
        };
      }
    },
  • Complete tool definition including name, description, empty inputSchema, detailed outputSchema for tools summary and per-server lists with namespacedName/refId, and annotations.
    export const listAvailableToolsDefinition: Tool = {
      name: "list-available-tools",
      description:
        "Discover all tools available from connected MCP servers. Returns structured data showing tools grouped by server for toolset creation. Tools can be referenced by 'namespacedName' (e.g., 'git.status') or 'refId' (unique hash). Example: Call with no parameters to see all tools organized by server with detailed metadata for each tool.",
      inputSchema: {
        type: "object" as const,
        properties: {},
        additionalProperties: false,
      },
      outputSchema: {
        type: "object" as const,
        properties: {
          summary: {
            type: "object",
            description: "High-level statistics about available tools",
            properties: {
              totalTools: {
                type: "number",
                description: "Total number of tools across all servers",
              },
              totalServers: {
                type: "number",
                description: "Number of connected MCP servers",
              },
            },
            required: ["totalTools", "totalServers"],
          },
          toolsByServer: {
            type: "array",
            description: "Tools organized by their source server",
            items: {
              type: "object",
              properties: {
                serverName: {
                  type: "string",
                  description: "Name of the MCP server",
                },
                toolCount: {
                  type: "number",
                  description: "Number of tools from this server",
                },
                tools: {
                  type: "array",
                  description: "List of tools from this server",
                  items: {
                    type: "object",
                    properties: {
                      name: {
                        type: "string",
                        description: "Original tool name",
                      },
                      description: {
                        type: "string",
                        description: "Tool description (optional)",
                      },
                      namespacedName: {
                        type: "string",
                        description:
                          "Namespaced name for unambiguous reference (serverName.toolName)",
                      },
                      serverName: {
                        type: "string",
                        description: "Source server name",
                      },
                      refId: {
                        type: "string",
                        description: "Unique hash identifier for this tool",
                      },
                    },
                    required: ["name", "namespacedName", "serverName", "refId"],
                  },
                },
              },
              required: ["serverName", "toolCount", "tools"],
            },
          },
        },
        required: ["summary", "toolsByServer"],
      },
      annotations: {
        title: "List Available Tools",
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false,
      },
    };
  • Tool factory registered in CONFIG_TOOL_FACTORIES array (imported and added at line 24, import line 9), and name listed in CONFIG_TOOL_NAMES (line 42).
    export const CONFIG_TOOL_FACTORIES: ToolModuleFactory[] = [
      createListAvailableToolsModule,
      createBuildToolsetModule,
      createListSavedToolsetsModule,
      createEquipToolsetModule,
      createDeleteToolsetModule,
      createUnequipToolsetModule,
      createGetActiveToolsetModule,
      createAddToolAnnotationModule,
      createListPersonasModule, // Persona management tool
      createExitConfigurationModeModule,
    ];
    
    /**
     * List of configuration tool names (derived from factories)
     * Note: This requires instantiation to get the actual names,
     * so we maintain a static list for convenience
     */
    export const CONFIG_TOOL_NAMES = [
      "list-available-tools",
      "build-toolset",
      "list-saved-toolsets",
      "equip-toolset",
      "delete-toolset",
      "unequip-toolset",
      "get-active-toolset",
      "add-tool-annotation",
      "list-personas", // Persona management tool
      "exit-configuration-mode",
    ] as const;
Behavior3/5

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

Annotations already cover key behavioral traits (read-only, non-destructive, idempotent, closed-world), so the description adds value by explaining the return structure ('structured data showing tools grouped by server') and referencing methods ('namespacedName' or 'refId'). It does not disclose additional aspects like rate limits or auth needs, but does not contradict annotations.

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 appropriately sized and front-loaded, starting with the core purpose. Each sentence adds value: the first defines the action, the second explains the return data and referencing methods, and the third provides a usage example, with no wasted words.

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

Completeness5/5

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

Given the tool's low complexity (0 parameters), rich annotations, and presence of an output schema, the description is complete. It covers purpose, return structure, and usage example, leaving output details to the schema, making it fully adequate for the agent's needs.

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?

With 0 parameters and 100% schema description coverage, the baseline is high. The description compensates by explaining that no parameters are needed ('Call with no parameters'), which clarifies usage beyond the empty schema, though it does not add semantic details about non-existent parameters.

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

Purpose5/5

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

The description clearly states the specific action ('Discover all tools available from connected MCP servers') and resource ('tools'), distinguishing it from sibling tools like 'list-saved-toolsets' which deals with saved toolsets rather than available tools. It provides concrete examples of how tools can be referenced, making the purpose unambiguous.

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

Usage Guidelines4/5

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

The description provides clear context on when to use this tool ('to see all tools organized by server with detailed metadata'), including an example call with no parameters. However, it does not explicitly state when not to use it or name alternatives among siblings, such as 'get-active-toolset' for currently equipped tools.

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/toolprint/hypertool-mcp'

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