Skip to main content
Glama
elias-michaias

Onyx Documentation MCP Server

get_onyx_functions

Retrieve Onyx programming language function definitions and code examples from GitHub documentation to support development tasks.

Instructions

Get Onyx function definitions and examples from GitHub

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
functionNameNoFunction name to search for (optional)
limitNoMaximum number of examples

Implementation Reference

  • The main handler method for the 'get_onyx_functions' tool. It calls the search engine helper and formats the MCP response with context.
    async getOnyxFunctions(functionName, limit = 10) { const results = await this.searchEngine.getOnyxFunctionExamples(functionName, limit); const toolMessage = functionName ? `Searching for Onyx function examples: "${functionName}"` : 'Searching for all available Onyx function examples'; return this.formatResponse(JSON.stringify(results, null, 2), toolMessage); }
  • Input schema definition for the 'get_onyx_functions' tool within the TOOL_DEFINITIONS array.
    { name: 'get_onyx_functions', description: 'Get Onyx function definitions and examples from GitHub', inputSchema: { type: 'object', properties: { functionName: { type: 'string', description: 'Function name to search for (optional)' }, limit: { type: 'number', description: 'Maximum number of examples', default: 10 } } } },
  • Tool registration in the executeTool dispatcher switch statement, routing calls to the handler.
    case 'get_onyx_functions': return await this.getOnyxFunctions(args.functionName, args.limit);
  • Helper method implementing the core logic: loads GitHub code patterns and filters/returns Onyx function examples.
    async getOnyxFunctionExamples(functionName = null, limit = 10) { const patterns = await this.loadData('githubPatterns'); if (!patterns) { return { error: 'GitHub patterns not available. Run GitHub crawler first.' }; } let functions = patterns.functions || []; if (functionName) { // Filter by function name (partial match) functions = functions.filter(func => func.definition.toLowerCase().includes(functionName.toLowerCase()) ); } return { query: functionName, totalFound: functions.length, examples: functions.slice(0, limit).map(func => ({ definition: func.definition, file: func.file, repository: func.repository, url: func.url })) }; }

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/elias-michaias/onyx_mcp'

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