Skip to main content
Glama
novitalabs

Novita MCP Server

Official
by novitalabs

list-products

Retrieve product details from a specific cluster on Novita MCP Server. Use cluster ID to fetch products, optionally filter by product name for targeted results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clusterIdNoID of the cluster to list products from. You can use the `list-clusters` tool to get the cluster ID.
productNameNoName of the product to filter by.

Implementation Reference

  • Handler function executing the tool logic: builds optional query parameters for clusterId and productName, fetches products from /products endpoint using novitaRequest, and returns formatted JSON response.
    }, async (params) => { const queryParams = new URLSearchParams(); if (params.clusterId) queryParams.append("clusterId", params.clusterId); if (params.productName) queryParams.append("productName", params.productName); const queryString = queryParams.toString() ? `?${queryParams.toString()}` : ""; const result = await novitaRequest(`/products${queryString}`); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; });
  • Input schema using Zod for validation of parameters: optional clusterId and productName strings with descriptions.
    clusterId: z .string() .optional() .describe("ID of the cluster to list products from. You can use the `list-clusters` tool to get the cluster ID."), productName: z .string() .optional() .describe("Name of the product to filter by."),
  • src/tools.ts:31-58 (registration)
    Direct registration of the 'list-products' tool on the McpServer instance within registerProductTools function, specifying name, input schema, and handler.
    server.tool("list-products", { clusterId: z .string() .optional() .describe("ID of the cluster to list products from. You can use the `list-clusters` tool to get the cluster ID."), productName: z .string() .optional() .describe("Name of the product to filter by."), }, async (params) => { const queryParams = new URLSearchParams(); if (params.clusterId) queryParams.append("clusterId", params.clusterId); if (params.productName) queryParams.append("productName", params.productName); const queryString = queryParams.toString() ? `?${queryParams.toString()}` : ""; const result = await novitaRequest(`/products${queryString}`); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; });
  • src/index.ts:23-23 (registration)
    Main server setup calls registerAllTools(server), which in turn calls registerProductTools to register the list-products tool among others.
    registerAllTools(server);

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/novitalabs/novita-mcp-server'

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