Skip to main content
Glama

w3_account_ls

Lists authorized accounts for the current agent on the storacha.network. Use after w3_login to verify agent linkage and authorization status, especially after reconnecting in ephemeral environments like Docker.

Instructions

Lists all accounts the current agent is authorized for. Use this command after w3_login and email validation to confirm the agent is successfully linked to your storacha.network account(s). Note: Agent state may be ephemeral (e.g., in Docker). Check authorization status with this command after (re)connecting, and use w3_login if needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic for the w3_account_ls tool. It validates input arguments using the schema, executes the 'w3 account ls' command, parses the NDJSON output into an accounts array, and returns a formatted response.
    const handleW3AccountLs: ToolHandler = async (_args) => {
      const parsed = Schemas.W3AccountLsArgsSchema.safeParse(_args);
      if (!parsed.success)
        throw new Error(
          `Invalid arguments for w3_account_ls: ${parsed.error.message}`
        );
      const { stdout } = await runW3Command("account ls");
      try {
        const accounts = parseNdJson(stdout);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                message: "Authorized accounts retrieved.",
                accounts,
              }),
            },
          ],
        };
      } catch (e) {
        logger.warn(`w3_account_ls: Failed to parse output as NDJSON: ${stdout}`);
        throw new Error(
          `Failed to parse JSON output for w3_account_ls. Raw output: ${stdout}`
        );
      }
    };
  • Zod schema for input validation of the w3_account_ls tool. It defines an empty object schema since no arguments are required, along with a detailed description.
    export const W3AccountLsArgsSchema = z
      .object({})
      .describe(
        "Lists all accounts the current agent is **authorized** for. Use this command after `w3_login` and email validation to confirm the agent is successfully linked to your storacha.network account(s). **Note:** Agent state may be ephemeral (e.g., in Docker). Check authorization status with this command after (re)connecting, and use `w3_login` if needed."
      );
  • Registration of the w3_account_ls tool handler in the toolHandlers map, which is used by the MCP server to route CallTool requests to the appropriate handler function.
    w3_account_ls: handleW3AccountLs,
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: the tool depends on authorization state, agent state may be ephemeral (e.g., in Docker), and it's used for confirmation/status checking. However, it doesn't detail output format, error conditions, or rate limits.

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 efficiently structured in three sentences: purpose, primary usage context, and a note about ephemeral state with reconnection guidance. Every sentence adds value without redundancy, and key information is front-loaded.

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

Completeness4/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 params, no annotations, no output schema), the description is largely complete for its purpose. It explains authorization dependencies and ephemeral state considerations. However, without an output schema, it doesn't describe what the list of accounts looks like (e.g., format, fields), leaving a minor gap.

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, so no parameter semantics are needed. The description doesn't add param info beyond the schema, but with 100% schema coverage and no params, a baseline of 4 is appropriate as the description focuses on usage context rather than compensating for missing param documentation.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Lists all accounts the current agent is authorized for.' It specifies the verb ('Lists') and resource ('accounts'), and distinguishes itself from siblings like 'w3_login' (which authenticates) and 'w3_ls' (which likely lists other resources).

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'after `w3_login` and email validation to confirm the agent is successfully linked' and 'after (re)connecting' to check authorization status. It also specifies an alternative action: 'use `w3_login` if needed' when authorization is lacking.

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