Skip to main content
Glama
terrakube-io

Terrakube MCP Server

by terrakube-io

list-organizations

Retrieve all organizations accessible to the current user within the Terrakube MCP Server, facilitating efficient workspace and infrastructure management.

Instructions

Lists all organizations accessible to the current user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list-organizations' tool. It makes a GET request to the /organization API endpoint using the configured API URL and PAT token, parses the JSON response, and returns it as a text content block.
    async () => {
      const response = await fetch(`${CONFIG.apiUrl}/organization`, {
        headers: {
          Authorization: `Bearer ${CONFIG.patToken}`,
          "Content-Type": "application/vnd.api+json"
        }
      });
    
      if (!response.ok) {
        throw new Error(`Failed to list organizations: ${response.statusText}`);
      }
    
      const data = await response.json();
      return {
        content: [{
          type: "text",
          text: JSON.stringify(data, null, 2)
        }]
      };
    }
  • The registration of the 'list-organizations' tool on the MCP server within the registerOrganizationTools function. Includes empty input schema {} and inline handler.
    server.tool(
      "list-organizations",
      "Lists all organizations accessible to the current user",
      {},
      async () => {
        const response = await fetch(`${CONFIG.apiUrl}/organization`, {
          headers: {
            Authorization: `Bearer ${CONFIG.patToken}`,
            "Content-Type": "application/vnd.api+json"
          }
        });
    
        if (!response.ok) {
          throw new Error(`Failed to list organizations: ${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 on the MCP server instance, which registers the 'list-organizations' 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 it's a read operation ('Lists'), but doesn't mention pagination behavior, rate limits, sorting/filtering capabilities, authentication requirements, or what 'accessible' means in practice. For a list tool with zero annotation coverage, this leaves significant behavioral gaps.

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 with zero waste. It's front-loaded with the core functionality and appropriately sized for a simple list operation. Every word earns its place.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It covers the basic purpose but lacks behavioral details needed for full contextual understanding, especially around pagination, filtering, and what 'accessible' entails. Without annotations or output schema, more behavioral context would be helpful.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the lack of parameters. The description appropriately doesn't add parameter information beyond what's in the schema, maintaining a baseline of 4 for zero-parameter tools.

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 verb ('Lists') and resource ('organizations'), specifying scope as 'all organizations accessible to the current user'. It distinguishes from siblings like 'get-organization' (singular) and 'create-organization' (write operation), but doesn't explicitly differentiate from other list tools like 'list-modules' or 'list-workspaces' beyond resource type.

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?

No guidance on when to use this tool versus alternatives is provided. The description doesn't mention prerequisites, when to choose this over 'get-organization' for single orgs, or how it relates to other list tools. It simply states what it does without usage context.

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