Skip to main content
Glama

get_isbn

Retrieve detailed book information by inputting an ISBN through the Brasil API MCP server, enabling quick access to essential data for AI agents and applications.

Instructions

Get information about a book given an ISBN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ISBNYesThe book's ISBN to query

Implementation Reference

  • The asynchronous handler function that executes the tool logic: fetches book information from BrasilAPI using the provided ISBN, formats the response, and handles errors.
    handler: async ({ ISBN }): Promise<McpResponse> => { try { const result = await brasilApiClient.isbn.getBy(ISBN); const content: McpTextContent = { type: "text", text: `Book with ISBN ${ISBN} found:\n${prettifyJson(result.data)}`, }; return { content: [content], }; } catch (error: any) { console.error(error); throw new Error(`Failed to fetch book with ISBN ${ISBN}`); } },
  • Zod schema defining the input parameters for the 'get_isbn' tool: a single 'ISBN' string parameter.
    const getISBNToolParams = { ISBN: z.string().describe("The book's ISBN to query"), }; type GetISBNToolParams = typeof getISBNToolParams;
  • src/index.ts:30-41 (registration)
    The tool is imported (line 8) and registered by adding it to the tools array and calling registerTool(server, tool) for each tool on the MCP server.
    const tools = [ getCepTool, getCepV2Tool, getBookByISBNTool, getCNPJTool, getAllBanksTool, getBankByCodeTool, ]; tools.forEach((tool) => { registerTool(server, tool); });

Other Tools

Related 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