Repository navigation
feat(mcp): agents read calendars, tasks and contacts in their scope - #82
Merged
Merged
Conversation
Plan 0012's reads (ADR-0042). The IDL opens account.collections, calendar.range, calendar.event, tasks.list, people.list and people.get to agents, and adds tasks.get. The engine keeps an agent to its scope's accounts: another account's calendar, event, task list, task, address book or person is notFound, lists skip them, and under account=<id> a person is made of the scope's contacts alone, name and search included. /mcp/mail gains list_collections, list_events (with clashes), read_event, list_tasks, read_task, search_contacts and read_contact, each with its limits, and a notice that now names calendars, tasks and contacts. The tools take their clock from lodge.Options.Now, so "today" is testable. kittest and the SDK client test the scope, the tools and every limit at and past its value. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 19, 2026
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan 0012's first part (M8.5, ADR-0042): agents can read the user's calendars, tasks and contacts through
/mcp/mail, but only for the accounts their scope reaches.What changes
The IDL opens these methods to caller
agent:account.collections;calendar.rangeandcalendar.event;tasks.list, and the newtasks.get;people.listandpeople.get.Nothing that writes is opened. Every event write,
tasks.delete, the otherpeoplemethods andvipstaymethodNotFoundto agents under every scope,;write;sendincluded. The tests check each of them.The engine keeps an agent to its scope (
internal/engine/scope.go):notFound, and lists skip them;account=<id>, a person is made of that scope's contacts alone. Their name, organization and search match come from those contacts (newstore.ScopedPeopleandstore.ScopedPerson), so another account's contact can't leak a name or match a query.New read tools, all
readOnlyHintand offered under every scope:list_collectionslist_eventsclashes: busy timed pairs that overlap, at most 50, withclash_countread_eventlist_taskstoday,overdue,undated, or all, intime_zone, optionally in one listread_tasksearch_contactsread_contactlodge.Options.Nowgives the tools a clock, so "today" can be tested.Docs:
specs/lodge-app.md;list_collectionslists enabled collections only, andlist_eventsanswersclash_count.Tests
Through
kittestand the MCP SDK client (internal/lodge/mcp_pim_test.go,mcp_pim_limits_test.go):list_events: 31 and 32 days,limit1, 200, -1 and 201, and 50 and 51 clashes;read_event: 100 and 101 attendees;list_tasks:limit1, 100, -1 and 101;search_contacts: a 256-byte query and a 257-byte one,limit50 and 51;I checked that the tests can fail: with the scope filter turned off, both scope tests fail.
Gates
make check,make build-windowsandmake ui-check(nsl, 1,327 tests) pass. The app's only change is in generated types.The waiting queries and the task and Remind Me writes follow in the next PRs, which build on this one.
🤖 Generated with Claude Code