Skip to content

Investigate performance improvements for command execution #54

@pento

Description

@pento

Summary

Commands triggered from the WordPress editor (proofread, review, etc.) can feel slow because each MCP tool call takes several seconds, and a single command may require multiple sequential tool calls. Investigate ways to reduce the end-to-end latency.

Current bottlenecks

Each command typically involves multiple round-trips:

  1. wp_update_command_status (running)
  2. wp_open_post (if not already open)
  3. wp_read_post
  4. One or more editing tool calls (wp_edit_block_text, wp_add_note, etc.)
  5. wp_update_command_status (completed)

Each tool call has overhead from the MCP stdio transport, LLM inference time, and HTTP round-trips to WordPress.

Areas to investigate

  • Batching: Could multiple operations be combined into fewer tool calls?
  • Pre-loading: Since the command includes post_id, could post content be pre-fetched and included in the channel notification?
  • Prompt design: Can prompts be structured to encourage fewer, more targeted tool calls?
  • Parallel tool calls: Are there sequential calls that could be made parallel?
  • Caching: Could recently-read post content be reused if the post hasn't changed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions