Skip to main content
Glama
ProsodyAI

@prosodyai/mcp-docs

Official
by ProsodyAI

List REST endpoints

list_endpoints

List ProsodyAI REST API endpoints from the bundled OpenAPI spec. Filter by tag or path substring to find specific endpoints.

Instructions

List ProsodyAI REST API endpoints from the bundled OpenAPI spec. Optional filters by tag or path substring.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoFilter by OpenAPI tag (e.g. `Analysis`, `Sessions`).
pathContainsNoSubstring filter on the URL path (e.g. `analyze`).

Implementation Reference

  • Core handler: async function listEndpoints() that loads the OpenAPI spec, iterates over paths/methods, applies optional tag/pathContains filters, and returns a sorted array of EndpointSummary objects.
    export async function listEndpoints(filter?: {
      tag?: string;
      pathContains?: string;
    }): Promise<EndpointSummary[]> {
      const spec = await loadOpenApi();
      if (!spec?.paths) return [];
      const out: EndpointSummary[] = [];
      for (const [path, methods] of Object.entries(spec.paths)) {
        for (const [method, op] of Object.entries(methods)) {
          if (!["get", "post", "put", "patch", "delete", "options", "head"].includes(method)) continue;
          const summary: EndpointSummary = {
            method: method.toUpperCase(),
            path,
            operationId: op.operationId,
            summary: op.summary,
            tags: op.tags,
          };
          if (filter?.tag && !(op.tags ?? []).includes(filter.tag)) continue;
          if (filter?.pathContains && !path.toLowerCase().includes(filter.pathContains.toLowerCase())) continue;
          out.push(summary);
        }
      }
      return out.sort((a, b) =>
        a.path === b.path ? a.method.localeCompare(b.method) : a.path.localeCompare(b.path),
      );
    }
  • MCP tool handler: the callback lambda registered for 'list_endpoints' that calls listEndpoints() with filter params and formats the response as text.
      async ({ tag, pathContains }) => {
        const endpoints = await listEndpoints({ tag, pathContains });
        if (!endpoints.length) {
          return textResponse(
            "No endpoints found. The OpenAPI spec may not be bundled — read `api/openapi-status` for instructions.",
          );
        }
        const lines = endpoints.map(
          (e) =>
            `${e.method.padEnd(6)} ${e.path}${e.summary ? `  — ${e.summary}` : ""}${
              e.tags?.length ? `  [${e.tags.join(", ")}]` : ""
            }`,
        );
        return textResponse(lines.join("\n"));
      },
    );
  • Type definition: EndpointSummary interface describing the shape of each returned endpoint (method, path, operationId, summary, tags).
    export interface EndpointSummary {
      method: string;
      path: string;
      operationId?: string;
      summary?: string;
      tags?: string[];
    }
  • Input schema: Zod schema for optional 'tag' and 'pathContains' parameters.
    inputSchema: {
      tag: z.string().optional().describe("Filter by OpenAPI tag (e.g. `Analysis`, `Sessions`)."),
      pathContains: z
        .string()
        .optional()
        .describe("Substring filter on the URL path (e.g. `analyze`)."),
    },
  • src/server.ts:140-169 (registration)
    Registration: server.registerTool('list_endpoints', ...) which wires the tool name, description, input schema, and handler.
    server.registerTool(
      "list_endpoints",
      {
        title: "List REST endpoints",
        description:
          "List ProsodyAI REST API endpoints from the bundled OpenAPI spec. Optional filters by tag or path substring.",
        inputSchema: {
          tag: z.string().optional().describe("Filter by OpenAPI tag (e.g. `Analysis`, `Sessions`)."),
          pathContains: z
            .string()
            .optional()
            .describe("Substring filter on the URL path (e.g. `analyze`)."),
        },
      },
      async ({ tag, pathContains }) => {
        const endpoints = await listEndpoints({ tag, pathContains });
        if (!endpoints.length) {
          return textResponse(
            "No endpoints found. The OpenAPI spec may not be bundled — read `api/openapi-status` for instructions.",
          );
        }
        const lines = endpoints.map(
          (e) =>
            `${e.method.padEnd(6)} ${e.path}${e.summary ? `  — ${e.summary}` : ""}${
              e.tags?.length ? `  [${e.tags.join(", ")}]` : ""
            }`,
        );
        return textResponse(lines.join("\n"));
      },
    );
Behavior3/5

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

No annotations provided, so description carries full burden. It implies a read operation but does not disclose potential pagination, rate limits, or whether the entire spec is returned. Adequate but not detailed.

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?

Single sentence, front-loaded with purpose, and efficiently mentions filters. No unnecessary words.

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

Completeness4/5

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

Low complexity (2 params, no output schema). Description explains purpose and filters but does not specify return format (full definitions vs. names). Minor gap but overall sufficient.

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

Parameters3/5

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

Schema description coverage is 100% for both parameters. Description only restates filter options without adding new meaning beyond the schema. Baseline score of 3 is appropriate.

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?

Description clearly states the verb (List), resource (REST API endpoints), and source (bundled OpenAPI spec). Optional filters are mentioned, distinguishing it from siblings like get_endpoint or get_openapi.

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?

Description implies use for listing endpoints with optional filtering, but does not explicitly mention when to use alternatives like get_endpoint for a single endpoint. Given sibling context, it's fairly clear.

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/ProsodyAI/mcp-docs'

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