Skip to main content
Glama
elias-michaias

Onyx Documentation MCP Server

get_onyx_functions

Retrieve Onyx function definitions and usage examples from GitHub. Specify a function name or set a limit to filter results for detailed programming insights.

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 primary handler function for the 'get_onyx_functions' MCP tool. It invokes the search engine helper, formats a tool-specific message, and returns a formatted MCP response.
    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); }
  • Core helper method that loads GitHub code patterns data, filters Onyx function definitions by name if provided, and returns matching examples with file/repo info.
    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 })) }; }
  • Input schema definition for the 'get_onyx_functions' tool, including parameters for functionName and limit.
    { 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 } } } },
  • Dispatch registration in the executeTool switch statement, mapping tool name to the handler function.
    case 'get_onyx_functions': return await this.getOnyxFunctions(args.functionName, args.limit);

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