Skip to main content
Glama
kongyo2

Glama MCP Server Search

get_mcp_server_attributes

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(); }

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