This server presents a foundational WordPress/translation bridge with significant gaps in definition quality. Tool names follow basic verb patterns (create, get, update, delete, list), but descriptions are minimal (10-30 chars), lack context for when to use each tool, and omit guidance on multi-step workflows. Input schemas are present with type declarations but lack essential constraints (enums for status/language codes, min/max for pagination). Parameters are described but at surface level, e.g., 'Post status (publish, draft, pending)' lacks clarification that this is an enum, and no dependency relationships are documented. Output schemas are not visible in the provided code, forcing LLMs to infer response structure. Error handling is not evident in the tool definitions. Security-wise, the endpoint checks OAuth tokens but tool-level permissions are sparse. The Translation tool's language parameters accept free-form strings instead of enums, inviting hallucinated locale codes. Overall, the server is functional but lacks production-grade polish.
Tool descriptions are critically short (10-40 chars) and lack actionable context. 'Create a new WordPress post' does not explain when an LLM should call this vs. similar tools, what fields are required, or what the return value contains.
Status and language parameters accept free-form strings instead of enums. 'status' for posts should declare enum: [publish, draft, pending]. 'source_language' and 'target_language' in translation should declare supported language codes as enums. Free-form strings invite hallucinated invalid values.
Expand all tool descriptions to 50-200 characters. Follow the formula: WHAT (verb + object + context), WHEN (use case or prerequisite), RETURN (key fields). Example: 'Create a new WordPress post. Returns post_id, permalink, and status. Use before publishing to set title, content, and publish status.' Current: 'Create a new WordPress post'.
Convert status parameters to enums: { 'type': 'string', 'enum': ['publish', 'draft', 'pending'], 'description': 'Publication status. One of: publish (visible to public), draft (hidden, editable), pending (awaiting review).' }
Add source and target language enums to Translation.translateText. Include supported codes: 'en', 'es', 'fr', 'de', etc. Declare as { 'type': 'string', 'enum': ['en', 'es', 'fr', ...], 'description': 'ISO 639-1 language code...' }.
Document output schemas for each tool. Provide a 'returns' field in tool definitions showing response structure and types. Example: 'Returns: { post_id: integer, title: string, content: string, status: string, permalink: string, created_at: ISO8601 }'.
Add pagination constraints to listPosts: { 'per_page': { 'type': 'integer', 'minimum': 1, 'maximum': 100, 'default': 20, 'description': '...' }, 'page': { 'type': 'integer', 'minimum': 1, 'description': '...' } }. Document that response includes 'total_count' and 'has_more' fields.
Implement confirmation pattern for deletePost. Either: (1) Add a 'confirm' parameter (defaults to false); require confirm=true to execute, or (2) return a preview response first: 'Are you sure you want to delete post 123 (title: "Hello World")? Call this tool again with confirm=true.'
Output schemas are not documented. The source code does not show what fields each tool returns, their types, or structure. LLMs cannot plan downstream tool chains (e.g., chaining getPost result into updatePost) without explicit response documentation.
Pagination support (listPosts) lacks documented constraints. No mention of min/max for per_page, no indication of total_count or next_cursor in response, no guidance on result limits. Large result sets will exhaust context windows.
deletePost lacks confirmation or dry-run pattern. Agents make mistakes, an irreversible delete should require confirmation or support a preview before execution.
Parameter relationships undocumented. updateOptions accepts arbitrary option_name without explaining which options are safe to modify, which require special permissions, or which are read-only. This invites accidental misconfiguration.
Error handling guidance is absent. Tool definitions do not indicate what errors are retryable, what LLM-fixable errors look like, or how to recover from common failures (post not found, invalid language code, permission denied).
Tool-level permissions/scopes are sparse. Code shows check_scope() validates 'read' vs 'write', but individual tools do not declare their required scope in the response (needed for least-privilege agent configuration). Tool definitions do not state which tools require which permissions.
Document updateOptions constraints: e.g., 'option_name must be one of the editable site options. System options like siteurl, home, admin_email cannot be modified via this tool, use WordPress admin UI instead. Modifying unrecognized options creates them as custom options.'
Add error handling guidance to all tool descriptions. Example: 'Throws 404 if post_id does not exist. Throws 403 if user lacks write:posts scope. Returns detailed error message with recovery steps (e.g., "Post not found. Try listPosts() to find valid post IDs.").'
Include scope/permission declarations in tool metadata. Amend each tool definition with 'required_scope': 'read' or 'write' (already in code but not exposed to LLM). Also add 'permissions': ['posts:create', 'posts:read', etc.] for audit clarity.
Validate input early and return actionable error messages. E.g., if language code is invalid, return: 'Invalid target_language: "xyx". Supported languages: en, es, fr, de, it, pt, ja, zh.' Instead of a generic 500 error.
Add a dependency hint to related tools. E.g., in updatePost description: 'To find a post ID, call listPosts() first.' In Translation description: 'Supports language pairs: en→es, en→fr, en→de. Source and target must be different.'
Consider batch variants for operations agents call in loops. E.g., a createPosts tool accepting an array of post objects, or addPostTags accepting post_id + array of tags. Sequential single-item calls waste tokens and latency.