rhombus-node-mcp
Version:
MCP server for Rhombus API
24 lines (23 loc) • 876 B
JavaScript
import { getOrg } from "../api/get-org-information-tool-api.js";
import { TOOL_ARGS } from "../types/get-org-information-tool-types.js";
const TOOL_NAME = "get-org-information";
const TOOL_DESCRIPTION = "Get general information about the organization including org name, camera configuration defaults, contact information, and org settings.";
const TOOL_HANDLER = async (_, extra) => {
const org = await getOrg(extra._meta?.requestModifiers, extra.sessionId);
return {
content: [
{
type: "text",
text: JSON.stringify(org),
},
],
};
};
export function createTool(server) {
server.registerTool(TOOL_NAME, {
title: "Organization Information",
description: TOOL_DESCRIPTION,
inputSchema: TOOL_ARGS,
annotations: { readOnlyHint: true },
}, TOOL_HANDLER);
}