get_all_banks
Retrieve detailed information about all banks in Brazil. Use this tool to access essential banking data for integration in applications or analysis.
Instructions
Get information of all banks from Brazil.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/banks.ts:6-25 (handler)The full tool definition for 'get_all_banks', including empty params schema, description, and the handler function that fetches all banks from Brasil API using brasilApiClient.bank.getAll() and returns the prettified JSON as text content.export const getAllBanksTool: McpToolDefinition = { name: "get_all_banks", description: "Get information of all banks from Brazil.", params: {}, 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`); } }, };
- src/index.ts:30-41 (registration)Registers the getAllBanksTool (imported earlier) by including it in the tools array and calling registerTool(server, tool) for each tool in the MCP server initialization.const tools = [ getCepTool, getCepV2Tool, getBookByISBNTool, getCNPJTool, getAllBanksTool, getBankByCodeTool, ]; tools.forEach((tool) => { registerTool(server, tool); });
- src/index.ts:10-10 (registration)Imports the getAllBanksTool definition from src/tools/banks.ts for registration in the main server.import { getAllBanksTool, getBankByCodeTool } from "./tools/banks.js";