Skip to main content
Glama
terrakube-io

Terrakube MCP Server

by terrakube-io

get-organization

Retrieve detailed information about a specific organization by its ID using the MCP server to manage Terrakube infrastructure efficiently.

Instructions

Retrieves detailed information about a specific organization by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesOrganization ID

Implementation Reference

  • The handler function for the 'get-organization' tool. It takes an organization ID, makes a GET request to the API endpoint `/organization/{id}`, handles errors, and returns the organization data as a formatted JSON string in the MCP response format.
    async ({ id }) => {
      const response = await fetch(`${CONFIG.apiUrl}/organization/${id}`, {
        headers: {
          Authorization: `Bearer ${CONFIG.patToken}`,
          "Content-Type": "application/vnd.api+json"
        }
      });
    
      if (!response.ok) {
        throw new Error(`Failed to get organization: ${response.statusText}`);
      }
    
      const data = await response.json();
      return {
        content: [{
          type: "text",
          text: JSON.stringify(data, null, 2)
        }]
      };
    }
  • The input schema for the 'get-organization' tool, defining a required 'id' parameter as a string with description.
    {
      id: z.string().describe("Organization ID")
    },
  • The registration of the 'get-organization' tool on the MCP server using server.tool(), including name, description, input schema, and handler function. This is called within registerOrganizationTools which is invoked from src/index.ts.
    server.tool(
      "get-organization",
      "Retrieves detailed information about a specific organization by its ID",
      {
        id: z.string().describe("Organization ID")
      },
      async ({ id }) => {
        const response = await fetch(`${CONFIG.apiUrl}/organization/${id}`, {
          headers: {
            Authorization: `Bearer ${CONFIG.patToken}`,
            "Content-Type": "application/vnd.api+json"
          }
        });
    
        if (!response.ok) {
          throw new Error(`Failed to get organization: ${response.statusText}`);
        }
    
        const data = await response.json();
        return {
          content: [{
            type: "text",
            text: JSON.stringify(data, null, 2)
          }]
        };
      }
    );
  • src/index.ts:22-22 (registration)
    Invocation of registerOrganizationTools(server) in the main server setup, which registers the 'get-organization' tool among others.
    registerOrganizationTools(server);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a retrieval operation but doesn't mention whether it's read-only, what permissions are required, what happens if the ID doesn't exist, or any rate limits. The description is minimal and doesn't provide sufficient behavioral context for a tool that accesses organizational data.

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 communicates the core purpose without any wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information.

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?

For a data retrieval tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'detailed information' includes, what format the response will be in, or any error conditions. Given the complexity of organizational data and the lack of structured output documentation, the description should provide more complete context.

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?

Schema description coverage is 100%, with the single parameter 'id' clearly documented as 'Organization ID' in the schema. The description adds no additional parameter information beyond what the schema provides, so the baseline score of 3 is appropriate when the schema does the heavy lifting.

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 ('retrieves detailed information') and the target resource ('about a specific organization by its ID'), which is a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from its sibling 'list-organizations' which presumably retrieves multiple organizations rather than a single one by ID.

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

Usage Guidelines3/5

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

The description implies usage context through 'by its ID' - suggesting this tool is for retrieving a specific known organization rather than listing all organizations. However, it doesn't explicitly state when to use this versus 'list-organizations' or mention any prerequisites like authentication requirements.

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

Related 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/terrakube-io/mcp-server-terrakube'

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