Skip to main content
Glama
createOrgTool.js780 B
import { influxRequest } from "../utils/influxClient.js"; // Tool: Create Organization export async function createOrg({ name, description }) { try { const orgData = { name, description, }; const response = await influxRequest("/api/v2/orgs", { method: "POST", body: JSON.stringify(orgData), }); const org = await response.json(); return { content: [{ type: "text", text: `Organization created successfully:\nID: ${org.id}\nName: ${org.name}\nDescription: ${org.description || "N/A" }`, }], }; } catch (error) { return { content: [{ type: "text", text: `Error creating organization: ${error.message}`, }], isError: true, }; } }

Implementation Reference

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/idoru/influxdb-mcp-server'

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