Skip to main content
Glama
terrakube-io

Terrakube MCP Server

by terrakube-io

edit-module

Modify module details like name, description, provider, and registry URL in the Terrakube MCP Server to ensure accurate infrastructure management.

Instructions

Updates an existing module's details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoNew module description
moduleIdYesModule ID
nameNoNew module name
organizationIdYesOrganization ID
providerNoNew provider name
registryNoNew registry URL

Implementation Reference

  • Handler function for the 'edit-module' tool. Performs a PATCH request to the API to update the specified module's attributes (name, description, registry, provider) in the given organization.
    async ({ organizationId, moduleId, name, description, registry, provider }) => {
      const response = await fetch(`${CONFIG.apiUrl}/organization/${organizationId}/module/${moduleId}`, {
        method: "PATCH",
        headers: {
          Authorization: `Bearer ${CONFIG.patToken}`,
          "Content-Type": "application/vnd.api+json"
        },
        body: JSON.stringify({
          data: {
            type: "module",
            id: moduleId,
            attributes: {
              name,
              description,
              registry,
              provider
            }
          }
        })
      });
    
      if (response.status === 204) {
        return {
          content: [{
            type: "text",
            text: "Module updated successfully"
          }]
        };
      } else {
        throw new Error(`Failed to update module: ${response.statusText}`);
      }
    }
  • Zod input schema for the 'edit-module' tool, defining required organizationId and moduleId, and optional updatable fields.
    {
      organizationId: z.string().describe("Organization ID"),
      moduleId: z.string().describe("Module ID"),
      name: z.string().optional().describe("New module name"),
      description: z.string().optional().describe("New module description"),
      registry: z.string().optional().describe("New registry URL"),
      provider: z.string().optional().describe("New provider name")
    },
  • Direct registration of the 'edit-module' tool using server.tool(), including name, description, input schema, and handler function.
    server.tool(
      "edit-module",
      "Updates an existing module's details",
      {
        organizationId: z.string().describe("Organization ID"),
        moduleId: z.string().describe("Module ID"),
        name: z.string().optional().describe("New module name"),
        description: z.string().optional().describe("New module description"),
        registry: z.string().optional().describe("New registry URL"),
        provider: z.string().optional().describe("New provider name")
      },
      async ({ organizationId, moduleId, name, description, registry, provider }) => {
        const response = await fetch(`${CONFIG.apiUrl}/organization/${organizationId}/module/${moduleId}`, {
          method: "PATCH",
          headers: {
            Authorization: `Bearer ${CONFIG.patToken}`,
            "Content-Type": "application/vnd.api+json"
          },
          body: JSON.stringify({
            data: {
              type: "module",
              id: moduleId,
              attributes: {
                name,
                description,
                registry,
                provider
              }
            }
          })
        });
    
        if (response.status === 204) {
          return {
            content: [{
              type: "text",
              text: "Module updated successfully"
            }]
          };
        } else {
          throw new Error(`Failed to update module: ${response.statusText}`);
        }
      }
    );
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. 'Updates' implies a mutation operation, but the description doesn't disclose permission requirements, whether changes are reversible, rate limits, error conditions, or what happens to unspecified fields. This leaves significant behavioral gaps for a write operation.

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 unnecessary words. It's appropriately sized for a straightforward update operation and is front-loaded with 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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'details' encompasses, what the response looks like, error handling, or how this tool relates to other module operations. The agent would struggle to use this tool effectively without additional 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?

The schema has 100% description coverage, so all 6 parameters are documented in the schema itself. The description adds no additional parameter semantics beyond the generic 'details' reference. This meets the baseline expectation when schema coverage is complete, but provides no extra value.

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 ('Updates') and resource ('an existing module's details'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'edit-organization', 'edit-variable', or 'edit-workspace' tools, which all follow the same 'Updates an existing X's details' pattern.

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 like 'create-module' or 'get-module'. It doesn't mention prerequisites (e.g., needing an existing module), exclusions, or contextual factors that would help an agent choose appropriately among the 15 sibling tools.

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