Skip to main content
Glama
generate_suggestions.js1.59 kB
/** * Generate specific code improvement suggestions based on best practices and patterns */ export const generateSuggestionsToolDefinition = { name: 'generate_suggestions', description: 'Generate specific code improvement suggestions based on best practices and patterns.', inputSchema: { type: 'object', properties: { pr_url: { type: 'string', description: 'GitHub PR URL (e.g., https://github.com/owner/repo/pull/123)', }, file_path: { type: 'string', description: 'Specific file to generate suggestions for', }, focus_areas: { type: 'array', items: { type: 'string', enum: ['performance', 'security', 'maintainability', 'readability', 'testing'], }, description: 'Specific areas to focus suggestions on', }, }, required: ['pr_url', 'file_path'], }, }; export async function handleGenerateSuggestions(github, analysis, args) { const { pr_url, file_path, focus_areas = [] } = args; if (!pr_url || !file_path) { throw new Error('PR URL and file path are required'); } const prDetails = await github.getPRDetails(pr_url); const suggestions = await analysis.generateSuggestions(prDetails, file_path, focus_areas); return { content: [ { type: 'text', text: JSON.stringify( { analysis_type: 'code_suggestions', pr_url, file_path, focus_areas, ...suggestions, }, null, 2 ), }, ], }; }

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/heruujoko/github-review-mcp'

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