Skip to main content
Glama
luizzzvictor

mcp-comexstat

by luizzzvictor

getNBMDetails

Retrieve detailed information about a specific NBM code using the coNbm input for accurate trade classification and compliance checks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coNbmYes

Implementation Reference

  • The handler function for the 'getNBMDetails' MCP tool. It takes coNbm as input, fetches details using the client, stringifies the result to JSON, and returns it as text content.
    async ({ coNbm }) => ({ content: [ { type: "text", text: JSON.stringify(await this.client.getNBMDetails(coNbm)), }, ], })
  • Input schema for the 'getNBMDetails' tool, defining coNbm as a required string using Zod.
    { coNbm: z.string(), },
  • Registration of the 'getNBMDetails' MCP tool on the server using server.tool(name, schema, handler).
    this.server.tool( "getNBMDetails", { coNbm: z.string(), }, async ({ coNbm }) => ({ content: [ { type: "text", text: JSON.stringify(await this.client.getNBMDetails(coNbm)), }, ], }) );
  • Helper method in ComexstatClient that implements the API call to retrieve NBM details for a given coNbm code.
    async getNBMDetails(coNbm: string): Promise<{ data: Array<{ coNBM: string; // NBM code noNBM: string; // NBM description }>; success: boolean; message: string | null; processo_info: any; language: string; }> { return this.get(`/tables/nbm/${coNbm}`); }

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/luizzzvictor/mcp-comexstat'

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