Skip to content

Conversation

@alaq
Copy link

@alaq alaq commented Jan 14, 2026

Summary

  • expose action item CRUD in MCP routers and hosted MCP SSE tools
  • add local MCP server action-item tool schemas and helpers
  • update MCP docs and add unit tests for action-item flows

Testing

python3 -m pytest backend/tests/unit -q
.............                                                            [100%]
=============================== warnings summary ===============================
tests/unit/test_mcp_action_items.py::test_get_action_items_truncates_locked_description
  /Users/adrien.lacquemant/github/omi/backend/models/memories.py:53: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
    @validator('category', pre=True)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
13 passed, 1 warning in 0.25s

Notes

  • I made this change because I'm enjoying the MCP but would like to get my action items that way too.
  • I haven't been able to test end to end because I don't have the Firebase credentials, but I have been able to see the tools in the inspector.

@alaq alaq changed the title Alaq/add action items to mcp Add MCP action-item tools to local and hosted servers Jan 14, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces comprehensive CRUD functionality for 'action items' to the MCP API and the MCP SSE tool implementation. This includes new endpoints, Pydantic models, database interactions, and notification triggers. The changes are well-structured and include corresponding unit tests and documentation updates.

My main feedback concerns a recurring race condition in both mcp.py and mcp_sse.py where a database write is immediately followed by a read to get the updated object for the response. This can fail due to replication lag in a distributed database, leading to incorrect error states being reported to the client. I've provided suggestions to refactor this pattern to be more robust by constructing the response object from data available in the API layer, thus avoiding the problematic second read. All specific comments addressing this issue have been retained as they align with best practices for distributed systems and are not contradicted by any provided rules.

@alaq alaq marked this pull request as ready for review January 14, 2026 06:06
@kodjima33
Copy link
Collaborator

@alaq bro sent you an email from nik @ basedhardware.com let's call

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.

2 participants