Skip to main content
Glama
listingbureau

Listing Bureau - Amazon Organic Ranking

lb_projects_list

Read-only

List Amazon organic ranking projects with optional filters by region and active status. Returns ASIN, keyword, and service volumes.

Instructions

List Listing Bureau Amazon projects with optional filters. Returns ASIN, keyword, active status, and current service volumes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoFilter by Amazon region code (GB accepted as alias for UK)
activeNoFilter by active status

Implementation Reference

  • The handler function for 'lb_projects_list'. Builds a query object with optional region/active filters, makes a GET request to /api/v1/projects, and returns the formatted result. Catches errors and formats them as error results.
      async (params) => {
        try {
          const query: Record<string, string> = { marketplace: "amazon" };
          if (params.region !== undefined) query.region = normalizeRegion(params.region);
          if (params.active !== undefined) query.active = String(params.active);
    
          const res = await client.request<ProjectListItem[]>(
            "GET",
            "/api/v1/projects",
            undefined,
            query,
            "lb_projects_list",
          );
          return formatResult(res.data);
        } catch (e) {
          return formatErrorResult(e);
        }
      },
    );
  • Input schema for lb_projects_list tool. Accepts optional 'region' parameter (validated against ACCEPTED_REGIONS enum, GB alias for UK) and optional 'active' boolean filter.
    {
      region: z
        .enum(ACCEPTED_REGIONS)
        .optional()
        .describe("Filter by Amazon region code (GB accepted as alias for UK)"),
      active: z.boolean().optional().describe("Filter by active status"),
    },
  • Registration of the 'lb_projects_list' tool on the MCP server via server.tool() inside registerProjectsTools(). Called from src/index.ts line 58.
    export function registerProjectsTools(server: McpServer, client: LBClient) {
      server.tool(
        "lb_projects_list",
        "List Listing Bureau Amazon projects with optional filters. Returns ASIN, keyword, active status, and current service volumes.",
        {
          region: z
            .enum(ACCEPTED_REGIONS)
            .optional()
            .describe("Filter by Amazon region code (GB accepted as alias for UK)"),
          active: z.boolean().optional().describe("Filter by active status"),
        },
        { readOnlyHint: true  },
        async (params) => {
          try {
            const query: Record<string, string> = { marketplace: "amazon" };
            if (params.region !== undefined) query.region = normalizeRegion(params.region);
            if (params.active !== undefined) query.active = String(params.active);
    
            const res = await client.request<ProjectListItem[]>(
              "GET",
              "/api/v1/projects",
              undefined,
              query,
              "lb_projects_list",
            );
            return formatResult(res.data);
          } catch (e) {
            return formatErrorResult(e);
          }
        },
      );
  • normalizeRegion helper: maps 'GB' to 'UK', passthrough for all others. Used by the handler to normalize the region parameter.
    /** Normalize user-supplied region code: GB -> UK, all others passthrough. */
    export function normalizeRegion(region: string): string {
      return region === "GB" ? "UK" : region;
    }
  • formatResult helper: formats a successful API response as an MCP CallToolResult, extracting warnings and balance_warning from the response data.
    export function formatResult(data: unknown): CallToolResult {
      const warnings: string[] = [];
      let cleaned: Record<string, unknown> | unknown = data;
    
      if (data && typeof data === "object") {
        const obj = { ...(data as Record<string, unknown>) };
    
        // Top-level warning string
        if ("warning" in obj && typeof obj.warning === "string") {
          warnings.push(obj.warning);
          delete obj.warning;
        }
    
        // balance_warning object (independent of warning)
        if ("balance_warning" in obj && obj.balance_warning && typeof obj.balance_warning === "object") {
          const bw = obj.balance_warning as Record<string, unknown>;
          const parts: string[] = [];
          if (typeof bw.warning === "string" && bw.warning.trim()) parts.push(bw.warning);
          if (typeof bw.daily_cost_estimate === "number")
            parts.push(`Daily cost estimate: $${bw.daily_cost_estimate.toFixed(2)}`);
          if (typeof bw.balance === "number")
            parts.push(`Balance: $${bw.balance.toFixed(2)}`);
          if (typeof bw.days_remaining === "number")
            parts.push(`Days remaining: ${bw.days_remaining.toFixed(1)}`);
          if (parts.length > 0) warnings.push(parts.join(" | "));
          delete obj.balance_warning;
        }
    
        cleaned = obj;
      }
    
      let text = JSON.stringify(cleaned, null, 2);
      for (const w of warnings) {
        text += `\n\n⚠️ Warning: ${w}`;
      }
    
      const notice = getUpdateNotice();
      if (notice) {
        text += `\n\n${notice}`;
      }
    
      return {
        content: [{ type: "text", text }],
      };
    }
Behavior3/5

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

Annotations already indicate readOnlyHint=true, so the description does not need to repeat safety. However, it adds the returned fields but does not disclose pagination, sorting, rate limits, or other behavioral traits that could affect usage.

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?

A single sentence that is direct and efficient, containing all essential information without extraneous words.

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?

The description covers what the tool returns but lacks information on default behavior, pagination, ordering, or result limits. Given the simplicity (2 optional params, no output schema), it is minimally adequate but has gaps.

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?

Schema coverage is 100%, so both parameters are fully described. The description mentions 'optional filters' but does not add additional meaning beyond the schema.

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 lists projects with optional filters and specifies the returned fields (ASIN, keyword, active status, service volumes). It is distinct from sibling tools like lb_projects_get (single project) and lb_projects_archive.

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

Usage Guidelines4/5

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

The description implies usage for listing projects with filters, but does not explicitly state when to use this tool versus alternatives like lb_projects_get or lb_projects_get_stats. No exclusion criteria are provided.

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

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/listingbureau/listingbureau-mcp'

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