Skip to main content
Glama
RhombusSystems

Rhombus MCP Server

Official
time-tool.ts1.03 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { parseTimeDescription } from "../api/time-tool-api.js"; import { TOOL_ARGS, type ToolArgs } from "../types/time-tool-types.js"; const TOOL_NAME = "time-tool"; const TOOL_DESCRIPTION = "This tool is capable of returning the time from a natural language query. If the user asks about the 'current time' use this tool. Try to kee time_description as close to the users initial query as possible. For example if someone says 'was X person seen today?' then time_description should be 'today'."; const TOOL_HANDLER = async (args: ToolArgs, extra: any) => { const { time_description, timezone } = args; const result = parseTimeDescription(time_description ?? undefined, timezone ?? undefined, extra); return { content: [ { type: "text" as const, text: JSON.stringify(result), }, ], }; }; 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