Skip to main content
Glama
RhombusSystems

Rhombus MCP Server

Official
count-tool.ts1.15 kB
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; import { logger } from "../logger.js"; export function createTool(server: McpServer) { server.tool( "count-tool", ` This tool counts the number of items by accepting an array of UUIDs. It can count anything that has UUIDs - users, devices, records, or any other entities. Simply provide an array of UUID strings and it will return the precise count. `, { uuids: z .array(z.string().describe("UUID string of an individual item")) .describe( "An array of UUID strings representing the items to count. Each string should be a valid UUID." ), }, async ({ uuids }) => { try { logger.info("Counting UUIDs", uuids); return { content: [{ type: "text", text: `Count: ${uuids.length}` }], }; } catch (e: unknown) { const errorMessage = e instanceof Error ? e.message : `Unknown error: ${e}`; return { content: [{ type: "text", text: `Error counting UUIDs: ${errorMessage}` }], }; } } ); }

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/RhombusSystems/rhombus-node-mcp'

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