Skip to content

Conversation

@tlongwell-block
Copy link
Collaborator

@tlongwell-block tlongwell-block commented Sep 1, 2025

THIS IS A ROUGH DRAFT TO SHOW A POC


This PR refactors the TODO task management tools from hardcoded platform tools to an internal MCP extension, bringing them in line with our extension architecture.

What changed

  • To-Do tools now register as a proper MCP extension when a session is available
  • Created TodoMcpClient that implements the standard McpClientTrait interface
  • Instructions moved from system prompt to extension metadata where they belong

Why this is better

  • Consistency: TODO tools follow the same patterns as all other extensions
  • Cleaner architecture: Tool logic is encapsulated, not scattered through the agent
  • Better testability: The MCP client can be tested in isolation
  • Smaller system prompt: Instructions come from the extension, reducing prompt overhead

Implementation notes

The tools continue to work exactly as before from the user's perspective. Session storage integration is preserved through a TodoStorage trait abstraction. The change touches minimal existing code - mostly just removing the hardcoded handling and adding the registration logic.

@michaelneale
Copy link
Collaborator

am a little confused - this is in process but looks like an MCP (with a faux-client?)

@tlongwell-block
Copy link
Collaborator Author

am a little confused - this is in process but looks like an MCP (with a faux-client?)

Yes, that's exactly what this is per #4454 (comment)

@tlongwell-block
Copy link
Collaborator Author

Closing to declutter open PRs since this might take a while to think through

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants