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)}` }]
            };
        }
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool sets an organization ID for subsequent requests, implying a stateful configuration change, but doesn't clarify if this persists across sessions, requires specific permissions, or has side effects like invalidating other settings. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's role in configuring state for subsequent requests, the description is incomplete. With no annotations, no output schema, and minimal behavioral context, it fails to address key aspects like persistence, error handling, or interaction with other tools, making it inadequate for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'orgId' documented as 'Organization ID'. The description adds no additional meaning beyond this, such as format examples or constraints, but the schema adequately covers the basics, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Set') and the resource ('organization ID for subsequent requests'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'set-api-url' which also configures settings, leaving room for ambiguity about when to use each.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as whether it's required before other operations or how it interacts with authentication tools like 'authenticate'. It lacks explicit context or exclusions, offering only a basic functional statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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