Skip to main content
Glama

listLighthousePortfolios

Retrieve detailed information on all Lighthouse portfolios, including total portfolio value, associated wallets, and their individual balances for comprehensive crypto portfolio analysis.

Instructions

List all Lighthouse portfolios, their total portfolio value, the wallets within each portfolio and their total value

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.ts:60-95 (handler)
    Handler function that executes the listLighthousePortfolios tool. Fetches user portfolios, retrieves detailed data for each portfolio, calculates total portfolio value, formats the output listing each portfolio's name, total USD value, number of wallets, and wallet details.
    execute: async () => {
      const portfolios = await lighthouse.getUserData();
      const porfolioData = await Promise.all(
        portfolios.user.portfolios.map(async (portfolio) => {
          return await lighthouse.getPortfolioData(portfolio.slug);
        })
      );
    
      //Sum the portfolios
      const totalPortfolioValue = porfolioData.reduce(
        (acc, data) => acc + data.usdValue,
        0
      );
    
      /// Format the porfolio data
      const formattedPorfolioData = porfolioData.map((data, i) => {
        return `# ${i + 1}. ${
          portfolios.user.portfolios[i].name
        }\n\n## Total Portfolio Value: $${data.usdValue.toLocaleString()}\n\n## Wallets (${
          Object.keys(data.accounts).length
        }):\n${Object.entries(data.accounts)
          .map(([accountId, account]) => `- ${account.name} (${account.type})`)
          .join("\n")}`;
      });
    
      return {
        content: [
          {
            type: "text",
            text: `# Lighthouse Portfolios\n\n${formattedPorfolioData.join(
              "\n"
            )}\n\n## Total Portfolio Value: $${totalPortfolioValue.toLocaleString()}`,
          },
        ],
      };
    },
  • Zod schema for tool parameters: no parameters required.
    parameters: z.object({}),
  • index.ts:55-96 (registration)
    Registration of the listLighthousePortfolios tool with FastMCP server, specifying name, description, schema, and handler.
    server.addTool({
      name: "listLighthousePortfolios",
      description:
        "List all Lighthouse portfolios, their total portfolio value, the wallets within each portfolio and their total value",
      parameters: z.object({}),
      execute: async () => {
        const portfolios = await lighthouse.getUserData();
        const porfolioData = await Promise.all(
          portfolios.user.portfolios.map(async (portfolio) => {
            return await lighthouse.getPortfolioData(portfolio.slug);
          })
        );
    
        //Sum the portfolios
        const totalPortfolioValue = porfolioData.reduce(
          (acc, data) => acc + data.usdValue,
          0
        );
    
        /// Format the porfolio data
        const formattedPorfolioData = porfolioData.map((data, i) => {
          return `# ${i + 1}. ${
            portfolios.user.portfolios[i].name
          }\n\n## Total Portfolio Value: $${data.usdValue.toLocaleString()}\n\n## Wallets (${
            Object.keys(data.accounts).length
          }):\n${Object.entries(data.accounts)
            .map(([accountId, account]) => `- ${account.name} (${account.type})`)
            .join("\n")}`;
        });
    
        return {
          content: [
            {
              type: "text",
              text: `# Lighthouse Portfolios\n\n${formattedPorfolioData.join(
                "\n"
              )}\n\n## Total Portfolio Value: $${totalPortfolioValue.toLocaleString()}`,
            },
          ],
        };
      },
    });
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 describes what data is returned but lacks critical behavioral details: whether this is a read-only operation, if it requires authentication (implied by sibling 'authenticate'), pagination or rate limits, or error conditions. The description is insufficient for a tool with zero annotation coverage.

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 front-loads the core action ('List all Lighthouse portfolios') and specifies the exact data returned. Every word adds value with zero waste or redundancy.

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?

Given no annotations, no output schema, and a read operation that likely requires authentication (based on sibling tools), the description is incomplete. It covers what data is returned but omits behavioral context like authentication requirements, response format, or error handling, which are essential for proper tool invocation.

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 (empty schema), so no parameter documentation is needed. The description appropriately focuses on output semantics, establishing a baseline of 4 for zero-parameter tools that describe their purpose clearly.

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 verb 'List' and the resource 'Lighthouse portfolios', specifying exactly what data is returned: portfolios, their total value, wallets within each, and wallet values. It distinguishes from siblings like getLighthousePortfolio (singular) and getLighthousePerformanceData (performance metrics).

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 for retrieving portfolio lists with values, but provides no explicit guidance on when to use this versus alternatives like getLighthousePortfolio (for a single portfolio) or getLighthousePerformanceData (for performance data). No exclusions or prerequisites are mentioned.

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/l3wi/mcp-lighthouse'

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