Skip to main content
Glama

set-organization

Configure the organization ID to manage PI Dashboard resources for subsequent API requests.

Instructions

Set the organization ID for subsequent requests

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgIdYesOrganization ID

Implementation Reference

  • Handler function that sets the global organization ID variable and returns a confirmation message or error response.
    }, async ({ orgId: newOrgId }) => { try { orgId = newOrgId; return { content: [{ type: "text", text: `Organization ID set to ${newOrgId}` }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error setting organization ID: ${getErrorMessage(error)}` }] }; } });
  • Zod input schema defining the required 'orgId' parameter as a number.
    orgId: z.number().describe("Organization ID")
  • build/index.js:574-592 (registration)
    Tool registration call that defines the name, description, input schema, and inline handler function for 'set-organization'.
    server.tool("set-organization", "Set the organization ID for subsequent requests", { orgId: z.number().describe("Organization ID") }, async ({ orgId: newOrgId }) => { try { orgId = newOrgId; return { content: [{ type: "text", text: `Organization ID set to ${newOrgId}` }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error setting organization ID: ${getErrorMessage(error)}` }] }; } });

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/mingzilla/pi-api-mcp-server'

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