Skip to main content
Glama
listingbureau

Listing Bureau - Amazon Organic Ranking

lb_feedback_submit

Submit feedback or feature requests to help improve the Amazon organic ranking campaign system.

Instructions

Submit feedback, feature requests, or suggestions (10-5000 characters)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feedbackYesFeedback text (10-5000 characters)

Implementation Reference

  • The handler function that executes the lb_feedback_submit tool logic. It sends a POST request with the feedback text to /api/v1/feedback and formats the result or error.
      async (params) => {
        try {
          const res = await client.request<MessageResponse>(
            "POST",
            "/api/v1/feedback",
            { feedback: params.feedback },
            undefined,
            "lb_feedback_submit",
          );
          return formatResult(res.data);
        } catch (e) {
          return formatErrorResult(e);
        }
      },
    );
  • Input schema using Zod validation: feedback string between 10-5000 characters.
    {
      feedback: z
        .string()
        .min(10)
        .max(5000)
        .describe("Feedback text (10-5000 characters)"),
    },
  • Registration of the tool via server.tool() within registerFeedbackTools(), called from index.ts line 61.
    export function registerFeedbackTools(server: McpServer, client: LBClient) {
      server.tool(
        "lb_feedback_submit",
        "Submit feedback, feature requests, or suggestions (10-5000 characters)",
        {
          feedback: z
            .string()
            .min(10)
            .max(5000)
            .describe("Feedback text (10-5000 characters)"),
        },
        { idempotentHint: false },
        async (params) => {
          try {
            const res = await client.request<MessageResponse>(
              "POST",
              "/api/v1/feedback",
              { feedback: params.feedback },
              undefined,
              "lb_feedback_submit",
            );
            return formatResult(res.data);
          } catch (e) {
            return formatErrorResult(e);
          }
        },
      );
  • The request() method on LBClient that handles authentication and sends the HTTP request. Used by the handler to POST feedback to the API.
    async request<T>(
      method: string,
      path: string,
      body?: Record<string, unknown>,
      query?: Record<string, string>,
      toolName?: string,
    ): Promise<ApiSuccessResponse<T>> {
      await this.ensureAuth();
      const response = await this.doRequest<T>(method, path, body, query, toolName);
    
      // Single retry on 401
      if (response.status === "error" && response._statusCode === 401) {
        this.jwt = null;
        await this.ensureAuth();
        const retry = await this.doRequest<T>(method, path, body, query, toolName);
        if (retry.status === "error") {
          throw new LBApiError(
            retry._statusCode ?? 500,
            retry.error.code,
            retry.error.message,
          );
        }
        return retry as ApiSuccessResponse<T>;
      }
    
      if (response.status === "error") {
        throw new LBApiError(
          response._statusCode ?? 500,
          response.error.code,
          response.error.message,
        );
      }
    
      return response as ApiSuccessResponse<T>;
    }
  • formatResult helper that formats successful API responses as MCP CallToolResult content. Used by the handler to return feedback submission results.
    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 }],
      };
    }
    
    /**
     * Format a paginated API response as an MCP tool result.
     * Includes pagination metadata.
     */
    export function formatPaginatedResult(
      data: unknown,
      meta: { page: number; per_page: number; total: number; total_pages: number },
    ): CallToolResult {
      const result = {
        data,
        pagination: meta,
      };
      let text = JSON.stringify(result, null, 2);
    
      const notice = getUpdateNotice();
      if (notice) {
        text += `\n\n${notice}`;
      }
    
      return {
        content: [{ type: "text", text }],
      };
    }
    
    /** Format an error as an MCP tool error result. */
    export function formatErrorResult(error: unknown): CallToolResult {
      return {
        content: [{ type: "text", text: formatError(error) }],
        isError: true,
      };
    }
Behavior2/5

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

Description does not disclose behavioral traits beyond what annotations provide (idempotentHint=false). It lacks details on confirmation, side effects, or whether submission creates a record. Annotations already indicate non-idempotent behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, concise sentence with necessary length constraint. Front-loaded and efficient, though could be slightly expanded.

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?

Adequate for a simple, single-parameter tool with no output schema. However, lacks details on expected behavior after submission (e.g., confirmation, storage).

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% with a description for the feedback parameter. The tool description adds no extra meaning beyond the schema, baseline of 3.

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 action ('Submit') and resource ('feedback'), and specifies the content type and length constraint. It is unambiguous and distinct from all sibling tools.

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?

No explicit guidance on when to use this tool versus alternatives, but no siblings perform similar functions. Usage is implied by the name and description.

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