Skip to main content
Glama
mauricio-cantu

brasil-api-mcp-server

get_all_banks

Retrieve comprehensive data on all Brazilian banks through the Brasil API MCP server. This tool provides bank information for applications requiring financial institution details in Brazil.

Instructions

Get information of all banks from Brazil.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the get_all_banks tool. It fetches all banks using the brasilApiClient, formats the response as pretty JSON, and returns it as text content. Handles errors by throwing a descriptive message.
    handler: async () => {
      try {
        const result = await brasilApiClient.bank.getAll();
        const content: McpTextContent = {
          type: "text",
          text: prettifyJson(result.data),
        };
        return {
          content: [content],
        };
      } catch (error: any) {
        console.error(error);
        throw new Error(`Failed to fetch banks`);
      }
    },
  • Tool definition including name, description, and empty params schema indicating no input parameters required.
    export const getAllBanksTool: McpToolDefinition = {
      name: "get_all_banks",
      description: "Get information of all banks from Brazil.",
      params: {},
  • src/index.ts:30-41 (registration)
    The getAllBanksTool is included in the tools array and registered on the MCP server using registerTool in a loop over all tools.
    const tools = [
      getCepTool,
      getCepV2Tool,
      getBookByISBNTool,
      getCNPJTool,
      getAllBanksTool,
      getBankByCodeTool,
    ];
    
    tools.forEach((tool) => {
      registerTool(server, tool);
    });
  • Helper function used in the handler to format the JSON response with indentation.
    export const prettifyJson = (data: any) => {
      return JSON.stringify(data, null, 2);
    };
  • Helper function used to register each tool on the MCP server.
    export const registerTool = (server: McpServer, tool: McpToolDefinition) => {
      server.tool(tool.name, tool.description, tool.params, tool.handler);
    };
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'gets information' but doesn't specify whether this is a read-only operation, requires authentication, has rate limits, or what the return format looks like. For a tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

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 directly states the tool's purpose without any wasted words. It's appropriately sized for a simple tool with no parameters and is front-loaded with the essential information.

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 the lack of annotations and output schema, the description is incomplete for proper tool usage. It doesn't explain what information is returned (e.g., bank names, codes, addresses), the format of the response, or any behavioral constraints. For a tool with no structured metadata, the description should provide more context about the operation and results.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't mention parameters, which is correct for this schema. A baseline of 4 is applied since the description doesn't need to compensate for any parameter gaps.

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 the verb ('Get') and resource ('information of all banks from Brazil'), making the purpose immediately understandable. It distinguishes from siblings like 'get_bank_by_code' by specifying 'all banks' rather than individual lookup. However, it doesn't specify what type of information is retrieved, keeping it from a perfect score.

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_bank_by_code' for specific bank lookups or other sibling tools for different data types. It lacks any context about prerequisites, timing, or exclusions, leaving the agent to infer usage based on tool names alone.

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/mauricio-cantu/brasil-api-mcp-server'

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