Skip to main content
Glama

list_external_products

List external products for an integration using integration ID and product name filter.

Instructions

List external products for an integration. GET /integrations/{integrationId}/products. Required: integrationId, productName (sent as name query param).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
integrationIdYesCompany integration ID (required)
productNameYesProduct name filter (required)

Implementation Reference

  • The handler function that executes the list_external_products tool logic. It parses args (integrationId, productName) using Zod, then calls integrationService.listExternalProducts to make the GET /integrations/{integrationId}/products?name={productName} API call.
    async function handler(client: Client, args: Record<string, unknown> | undefined) {
      const parsed = schema.safeParse(args);
      if (!parsed.success) {
        return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
      }
      const { integrationId, productName } = parsed.data;
      return handleToolCall(() =>
        integrationService.listExternalProducts(client, integrationId, { name: productName })
      );
    }
  • Zod input schema defining required fields: integrationId (string) and productName (string).
    const schema = z.object({
      integrationId: z.string().min(1, "integrationId is required"),
      productName: z.string().min(1, "productName is required"),
    });
  • Tool definition object with name 'list_external_products', description, and JSON Schema input schema.
    const definition = {
      name: "list_external_products",
      description:
        "List external products for an integration. GET /integrations/{integrationId}/products. Required: integrationId, productName (sent as name query param).",
      inputSchema: {
        type: "object" as const,
        properties: {
          integrationId: { type: "string", description: "Company integration ID (required)" },
          productName: { type: "string", description: "Product name filter (required)" },
        },
        required: ["integrationId", "productName"],
      },
    };
  • Tool is registered as part of the integration tools array returned by registerIntegrationTools().
    export function registerIntegrationTools(): Tool[] {
      return [
        listIntegrationsTool,
        getIntegrationConfigTool,
        getIntegrationByKeyTool,
        listIntegrationsByKeyTool,
        listExternalInvoicesTool,
        listExternalProductsTool,
        getExternalProductTool,
        listOrderStatusesTool,
      ];
    }
  • The service layer function that performs the actual HTTP GET request to /integrations/{integrationId}/products with optional name query parameter.
    /** GET /integrations/{integrationId}/products. Optional name filter. */
    export async function listExternalProducts(
      client: Client,
      integrationId: string,
      params?: ListExternalProductsParams
    ): Promise<unknown> {
      const search = new URLSearchParams();
      if (params?.name) search.append("name", params.name);
      const q = search.toString();
      return client.get<unknown>(`/integrations/${integrationId}/products${q ? `?${q}` : ""}`);
    }
Behavior3/5

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

With no annotations, the description must carry the behavioral transparency burden. It implies a read-only operation via the verb 'list' and provides the HTTP method. However, it does not explicitly state that it is non-destructive, nor does it mention authentication, rate limits, or any side effects. Adequate but minimal.

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 extremely concise, delivering the purpose, endpoint, and required parameters in a single line. No unnecessary words; efficiently front-loaded.

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?

No output schema provided, yet the description does not mention return values or structure (e.g., list of product objects, pagination). For a list operation, agents need to know what to expect in the response. This gap reduces completeness.

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%, and the description adds only that productName is sent as a 'name' query param, which is minor additional context. The schema descriptions already adequately explain the parameters, so the description adds little semantic value beyond that.

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 it lists external products for an integration, includes the HTTP method and path, and specifies required parameters. While it doesn't explicitly distinguish from similar list tools (e.g., list_products, get_external_product), the mention of 'for an integration' and the required integrationId makes its purpose clear.

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 no guidance on when to use this tool versus alternatives like get_external_product or list_products. It only lists required parameters without contextual or exclusionary advice.

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/rhinosaas/rebillia-mcp-server'

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