Skip to main content
Glama
miniOrangeDev

WordPress Code Review MCP Server

get_guidelines

Retrieve coding guidelines for WordPress projects, including security rules and validation patterns, filtered by specific categories to ensure adherence to development standards.

Instructions

Get development guidelines from the configured source

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoOptional category of guidelines to retrieve (e.g., security-rules, validation-rules)

Implementation Reference

  • The main handler function for the 'get_guidelines' tool. It fetches guidelines from the source using the optional category parameter and returns the content in the MCP format.
    private async getGuidelines(category?: string) { try { const content = await this.guidelineSource.fetchGuidelines(category); return { content: [ { type: 'text', text: content, }, ], }; } catch (error) { throw new Error(`Failed to fetch guidelines: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
  • Input schema definition for the 'get_guidelines' tool, specifying an optional 'category' string parameter.
    inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'Optional category of guidelines to retrieve (e.g., security-rules, validation-rules)', }, }, },
  • Tool registration in getTools() method, including name, description, and schema.
    { name: 'get_guidelines', description: 'Get development guidelines from the configured source', inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'Optional category of guidelines to retrieve (e.g., security-rules, validation-rules)', }, }, }, },
  • src/index.ts:48-52 (registration)
    MCP server registration for ListToolsRequestSchema, which exposes the tools including 'get_guidelines'.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: guidelinesManager.getTools(), }; });
  • src/index.ts:54-57 (registration)
    MCP server registration for CallToolRequestSchema, which dispatches to handleTool for execution of 'get_guidelines'.
    server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; return await guidelinesManager.handleTool(name, args); });

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/miniOrangeDev/wp-code-review-mcp-server'

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