Skip to main content
Glama
RhombusSystems

Rhombus MCP Server

Official
location-tool.ts1.13 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestModifiers } from "../util.js"; import { getLocations } from "../api/location-tool-api.js"; import { TOOL_ARGS, type ToolArgs } from "../types/location-tool-types.js"; const TOOL_NAME = "location-tool"; const TOOL_DESCRIPTION = `This tool performs operations on locations. - 'get': Retrieves all locations. When generating reports with location details, use location names not uuids.`; const TOOL_HANDLER = async (args: ToolArgs, extra: any) => { const { action } = args; let ret; switch (action) { case "get": ret = await getLocations(extra._meta?.requestModifiers as RequestModifiers, extra.sessionId); break; case "update": ret = { error: true, status: "not implemented" }; break; default: ret = { error: true, status: `unsupported location tool call: ${action}` }; break; } return { content: [{ type: "text" as const, text: JSON.stringify(ret) }], }; }; export function createTool(server: McpServer) { server.tool(TOOL_NAME, TOOL_DESCRIPTION, TOOL_ARGS, TOOL_HANDLER); }

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