Skip to main content
Glama

explain_formula

Interpret and clarify mathematical formulas by providing detailed explanations and optional examples to enhance understanding and application.

Instructions

Explain a mathematical formula interactively

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
examplesNoInclude examples
formulaYesThe formula to explain

Implementation Reference

  • The asynchronous handler function that executes the 'explain_formula' tool. It takes formula and optional examples parameters, logs the action, increments a request counter, and returns a markdown-formatted text response explaining the formula with optional examples section.
    async ({ formula, examples }) => { log.info('Explaining formula'); requestCount++; return { content: [ { type: 'text', text: `## Formula Explanation: ${formula}\n\n` + `This tool provides interactive explanations of mathematical formulas.\n` + `${examples ? '\n### Examples:\n- Example calculations would be shown here\n- Visual representations might be included\n' : ''}\n` + `**Note**: This tool may use elicitInput for interactive learning.`, }, ], }; },
  • Zod schema defining the input parameters for the 'explain_formula' tool: a required 'formula' string and an optional 'examples' boolean.
    const explainFormulaInputSchema = { formula: z.string().describe('The formula to explain'), examples: z.boolean().optional().describe('Include examples'), };
  • src/server.ts:757-781 (registration)
    The server.registerTool invocation that registers the 'explain_formula' tool with its title, description, input schema, and inline handler function. This occurs within the registerExtendedTools function.
    server.registerTool( 'explain_formula', { title: 'Explain Formula', description: 'Explain a mathematical formula interactively', inputSchema: explainFormulaInputSchema, }, async ({ formula, examples }) => { log.info('Explaining formula'); requestCount++; return { content: [ { type: 'text', text: `## Formula Explanation: ${formula}\n\n` + `This tool provides interactive explanations of mathematical formulas.\n` + `${examples ? '\n### Examples:\n- Example calculations would be shown here\n- Visual representations might be included\n' : ''}\n` + `**Note**: This tool may use elicitInput for interactive learning.`, }, ], }; }, );

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/yigitkonur/example-mcp-server-stdio'

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