Skip to main content
Glama
kongyo2

Glama MCP Server Search

get_mcp_server_attributes

Read-only

Retrieve available attributes for filtering MCP servers in the Glama MCP directory, enabling precise search and exploration through the Glama MCP API.

Instructions

Get available attributes that can be used to filter MCP servers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute function that makes a request to the Glama API endpoint '/v1/attributes' to retrieve available filtering attributes for MCP servers and returns the JSON response or an error message.
    execute: async () => {
      try {
        const result = await makeGlamaRequest("/v1/attributes");
        return JSON.stringify(result, null, 2);
      } catch (error) {
        return `Error getting MCP server attributes: ${error instanceof Error ? error.message : String(error)}`;
      }
    },
  • Parameters schema defined as an empty Zod object, indicating the tool takes no input arguments.
    parameters: z.object({}),
  • src/server.ts:122-140 (registration)
    Registers the 'get_mcp_server_attributes' tool using server.addTool(), including annotations, description, execute handler, name, and parameters schema.
    server.addTool({
      annotations: {
        openWorldHint: true,
        readOnlyHint: true,
        title: "Get MCP Server Attributes",
      },
      description:
        "Get available attributes that can be used to filter MCP servers",
      execute: async () => {
        try {
          const result = await makeGlamaRequest("/v1/attributes");
          return JSON.stringify(result, null, 2);
        } catch (error) {
          return `Error getting MCP server attributes: ${error instanceof Error ? error.message : String(error)}`;
        }
      },
      name: "get_mcp_server_attributes",
      parameters: z.object({}),
    });
  • The makeGlamaRequest helper function used by the tool (and others) to perform authenticated? API requests to the Glama MCP API base URL with optional query parameters.
    async function makeGlamaRequest(
      endpoint: string,
      params?: Record<string, string>,
    ) {
      const url = new URL(`${GLAMA_API_BASE}${endpoint}`);
    
      if (params) {
        Object.entries(params).forEach(([key, value]) => {
          if (value) {
            url.searchParams.append(key, value);
          }
        });
      }
    
      const response = await fetch(url.toString());
    
      if (!response.ok) {
        throw new Error(
          `API request failed: ${response.status} ${response.statusText}`,
        );
      }
    
      return response.json();
    }
Behavior4/5

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

Annotations provide readOnlyHint=true and openWorldHint=true, indicating a safe, read-only operation with potentially open-ended results. The description adds value by clarifying that the attributes are for filtering, which isn't covered by annotations. No contradiction exists, as 'Get' aligns with read-only behavior.

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, clear sentence that directly states the tool's function without unnecessary words. It is front-loaded with the core purpose, making it highly efficient and easy to understand.

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

Completeness3/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) and good annotations, the description is adequate but minimal. It covers the basic purpose but lacks details on output format or how the attributes relate to sibling tools, leaving some contextual gaps for an agent.

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 schema fully documents the lack of inputs. The description adds context by explaining the purpose of the output (attributes for filtering), which compensates for the absence of parameter details, justifying a score above the baseline of 3.

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 available attributes') and the resource ('MCP servers'), specifying that these attributes are used for filtering. However, it doesn't explicitly differentiate from sibling tools like 'get_mcp_server_details' or 'search_mcp_servers' in terms of purpose, which prevents a perfect score.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning 'attributes that can be used to filter MCP servers', suggesting this tool is preparatory for filtering operations. However, it lacks explicit guidance on when to use this versus alternatives like 'search_mcp_servers' or prerequisites, leaving room for ambiguity.

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/kongyo2/Glama-MCP-Server-Search'

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