Skip to main content
Glama

w3_plan_get

Retrieve the storage plan details for a specified or currently authorized account on the MCP IPFS Server to manage data storage and access.

Instructions

Displays the plan associated with the current or specified account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdNoOptional account ID to get plan for (defaults to current authorized account).

Implementation Reference

  • The main execution handler for the 'w3_plan_get' tool. It validates arguments using the schema, runs the 'w3 plan get [--account ID]' command via runW3Command, parses the NDJSON stdout output, and returns structured plan data or throws detailed errors.
    const handleW3PlanGet: ToolHandler = async (args) => {
      const parsed = Schemas.W3PlanGetArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(
          `Invalid arguments for w3_plan_get: ${parsed.error.message}`
        );
      const { accountId } = parsed.data;
      let command = "plan get";
      if (accountId) command += ` --account ${accountId}`;
      const { stdout } = await runW3Command(command);
      try {
        const planData = parseNdJson(stdout);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                message: "Plan information retrieved.",
                planData: planData.length > 0 ? planData[0] : {},
              }),
            },
          ],
        };
      } catch (e) {
        logger.warn(`w3_plan_get: Failed to parse output as NDJSON: ${stdout}`);
        throw new Error(
          `Failed to parse JSON output for w3_plan_get. Raw output: ${stdout}`
        );
      }
    };
  • Zod input schema for the w3_plan_get tool, defining an optional 'accountId' string parameter.
    export const W3PlanGetArgsSchema = z
      .object({
        accountId: z
          .string()
          .optional()
          .describe(
            "Optional account ID to get plan for (defaults to current authorized account)."
          ),
      })
      .describe(
        "Displays the plan associated with the current or specified account."
      );
  • The exported toolHandlers map registers all tool handlers, including 'w3_plan_get: handleW3PlanGet' at line 969. This map is imported and used in src/index.ts to dispatch CallTool requests to the appropriate handler.
    // Tool Handlers Map
    export const toolHandlers: Record<string, ToolHandler> = {
      w3_login: handleW3Login,
      w3_space_ls: handleW3SpaceLs,
      w3_space_use: handleW3SpaceUse,
      w3_space_create: handleW3SpaceCreate,
      w3_up: handleW3Up,
      w3_ls: handleW3Ls,
      w3_rm: handleW3Rm,
      w3_open: handleW3Open,
      w3_space_info: handleW3SpaceInfo,
      w3_space_add: handleW3SpaceAdd,
      w3_delegation_create: handleW3DelegationCreate,
      w3_delegation_ls: handleW3DelegationLs,
      w3_delegation_revoke: handleW3DelegationRevoke,
      w3_proof_add: handleW3ProofAdd,
      w3_proof_ls: handleW3ProofLs,
      w3_key_create: handleW3KeyCreate,
      w3_bridge_generate_tokens: handleW3BridgeGenerateTokens,
      w3_can_blob_add: handleW3CanBlobAdd,
      w3_can_blob_ls: handleW3CanBlobLs,
      w3_can_blob_rm: handleW3CanBlobRm,
      w3_can_index_add: handleW3CanIndexAdd,
      w3_can_upload_add: handleW3CanUploadAdd,
      w3_can_upload_ls: handleW3CanUploadLs,
      w3_can_upload_rm: handleW3CanUploadRm,
      w3_plan_get: handleW3PlanGet,
      w3_account_ls: handleW3AccountLs,
      w3_space_provision: handleW3SpaceProvision,
      w3_coupon_create: handleW3CouponCreate,
      w3_usage_report: handleW3UsageReport,
      w3_can_access_claim: handleW3CanAccessClaim,
      w3_can_store_add: handleW3CanStoreAdd,
      w3_can_store_ls: handleW3CanStoreLs,
      w3_can_store_rm: handleW3CanStoreRm,
      w3_can_filecoin_info: handleW3CanFilecoinInfo,
      w3_reset: handleW3Reset,
    };
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 'Displays,' which suggests a read-only operation, but doesn't confirm if it's safe, requires specific permissions, or has side effects. It also doesn't describe the output format (e.g., JSON structure, error handling), leaving the agent uncertain about what to expect beyond the basic action.

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, clear sentence that efficiently conveys the core functionality without unnecessary words. It's front-loaded with the main action and resource, making it easy to parse. There's no redundancy or fluff, earning a top score for conciseness.

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 low complexity (1 optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, output format, and usage context. Without annotations or an output schema, the agent is left with gaps in understanding the full tool behavior, making it incomplete for optimal 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 'accountId' well-documented in the schema itself. The description adds minimal value beyond the schema by mentioning 'the current or specified account,' which aligns with the schema's default behavior. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't provide additional semantic details.

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 ('Displays') and resource ('plan'), making the purpose understandable. It specifies that the plan is associated with 'the current or specified account,' which adds context. However, it doesn't explicitly differentiate this tool from potential siblings like 'w3_space_info' or 'w3_usage_report,' which might also provide account-related information, so it falls short of a perfect score.

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 minimal guidance: it implies usage when needing to view a plan, but offers no explicit when-to-use criteria, no exclusions, and no alternatives. For example, it doesn't clarify if this is for billing, feature access, or other purposes, nor does it reference sibling tools. This lack of context makes it harder for an agent to decide when to invoke this tool over others.

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/alexbakers/mcp-ipfs'

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