Table of Contents

What a credential may do

Authentication decides whether a caller reaches a surface at all. What it may then do is a permission: a named capability MailFathom publishes, granted to a user through a role and, on a mail surface, kept to what the user credential that admitted it names, checked by the use case behind every operation, and counted under its own name when a caller is refused.

This page is the whole model. The names, what each one reaches, how a grant is written, what an unwritten grant means, and what a refused caller is told are all here; the pages that configure a listener, publish a tool, or serve a route link back to this one rather than restating it. ADR 0012 is the record of why the model has this shape.

The published set

The set is closed: every name a grant can carry has a check behind it, so a misspelling fails startup rather than reading as a narrower grant than you meant. A name is mailfathom.<domain>[.<subject>].<verb>, lowercase and dot-separated, and always a valid OAuth scope token so the same string can travel in a token's scope claim. The domain says what the name is a grant over — a person's mail, their contacts, their tasks, their calendar, their notifications, their profile, the assistant, or the deployment itself — and the set has two disjoint halves: mailfathom.admin.* is the administrative half, and every other domain is the user-facing half, which reaches what this deployment holds for the one person the credential acts for.

Permission Half What it covers
mailfathom.mail.read user-facing The tools that read the local mailbox copy: list_accounts, list_emails, get_email_content, search_emails. On the client endpoint it also reaches GET /api/client/accounts and GET /api/client/folders with GET /api/client/managed-folders, which name the signed-in user's own accounts and folders and how current each of them is, and GET /api/client/emails with GET /api/client/emails/search GET /api/client/threads/{threadId}, GET /api/client/messages/{storedEmailId}, GET /api/client/messages/{storedEmailId}/body, and GET /api/client/messages/{storedEmailId}/attachments/{position}, which are the user's mail itself — subjects, correspondents, the opening of each message's text, the extracts a search cuts around what matched, one whole conversation at a time, one message's headers with what was established about its author and what it carries, one message's whole body as the document a reading pane draws and as the words beside it, and the octets of any file it carries. It also reaches POST /api/client/citations/resolution, which follows the citations of a presentation plan to the mail behind them: a message, a passage of one with the offsets it was cut from, or a file it carries — all of it mail this grant already reads, published under the scope the routes above are read under, so a source outside it is reported as private rather than served. It is also half of what GET /api/client/contacts/{contactId}/correspondence asks — the conversations one contact's addresses appear in and the documents they sent, which is this grant's own mail read back against a person rather than a folder, and the other half is mailfathom.contacts.read below. It also reaches GET /api/client/record, which is that user's own record as the deployment holds it, secrets redacted, and GET /api/client/record/mail-accounts, which is each of their mailboxes' settings as the deployment's policies resolve them, no secret among them — reading which mailboxes are read for you is part of reading your mail. Which mailboxes those are is decided administratively, and changing the folders of each is mailfathom.mail.accounts.write below. It is also what POST /api/client/signals/ticket is published under, which mints the single-use ticket a client opens the signal channel against: what that channel says is that mail arrived, that stored mail moved, that a folder set moved, that a notification was written, or that a run finished — each of them an instruction to read again over the route that holds the answer rather than an answer of its own. One of those lines carries a notification's own headline, so the ticket is minted only for a caller who holds mailfathom.notifications.read as well, and one holding this grant alone is refused naming it. It reaches nothing this deployment keeps beside the mailbox: a person's tasks, calendar, notification centre, and profile are each read and changed under a grant of their own, below. Where semantic retrieval is configured, searching places the caller's own query text with the embedding provider, so this is not an egress-free grant
mailfathom.mail.flags.write user-facing set_mail_flags, which marks mail read or unread, stars or unstars it, and writes its keywords. On the client endpoint it also reaches POST /api/client/mutations/flags, which is the same act asked for one batch at a time, and POST /api/client/mutations/flags/withdrawals, which takes back one that has not reached the server yet — withdrawing needs authority over the same kind of change rather than authority of its own, because the worst it does is stop one. It is the one MCP grant whose effect reaches the user's mail server, and it does not follow from reading mail: a deployment that lets an agent read has not thereby let it change anything. It does not reach placement: moving mail is mailfathom.mail.move below
mailfathom.mail.move user-facing Filing the user's mail into another folder: POST /api/client/mutations/moves and POST /api/client/mutations/moves/withdrawals. It is separate from mailfathom.mail.flags.write because the two acts fail differently — a flag misdescribes mail the user can still find, while a move puts the mail somewhere else and on a server without MOVE is a copy followed by a delete. Reading where a move has got to is mailfathom.mail.read, like every other read here. It publishes no MCP tool
mailfathom.mail.delete user-facing Deleting the user's mail off their mail server outright: POST /api/client/mutations/deletes, POST /api/client/mutations/deletes/withdrawals, and POST /api/client/mutations/deletes/releases. It is separate from mailfathom.mail.move because filing mail elsewhere leaves it there to be found and this does not — the occurrence is expunged, and what becomes of the local copy is the account's configured disposition rather than the caller's to name. A delete written there waits out the person's own notification time and a short grace before anything reaches the server; the withdrawal route takes it back while it waits, under this grant because the grant that wrote a change is the grant that withdraws it, and the release route ends the wait early. Which folder the message is in decides nothing here — the trash-only rule the client draws is a sentence on a screen rather than a policy of the deployment's, so the grant is the whole of the boundary. Reading where a delete has got to is mailfathom.mail.read, like every other read here. It publishes no MCP tool
mailfathom.mail.drafts.write user-facing save_draft, update_draft, and delete_draft, which write a message into the user's own drafts folder, replace it, and take it back out. It is the safe half of authoring mail and is its own name because that half is worth granting on its own: a draft is delivered to nobody, is withdrawn by deleting it, and lands in a folder the user already reads, so an agent holding this and nothing else can prepare mail whose worst failure is a message in Drafts. It does not imply mailfathom.mail.send and is not implied by it — send_draft is admitted under the sending grant, so a caller holding this name alone cannot make a draft leave. Its effect does reach the user's own mail server, which is mailfathom.mail.flags.write's reach rather than a send's. A draft answering stored mail needs mailfathom.mail.read beneath it as well, because an answer is derived from the message it answers. On the client endpoint it reaches the drafts routes — listing, opening, composing, revising, giving up, and staging or removing a file — which are the same acts on the same drafts in the same folder, so a person's client and an agent draw on one name rather than two
mailfathom.mail.send user-facing Asking this deployment to send mail from an account it holds. It is the one grant here whose effect leaves the deployment and cannot be recalled, which is why it follows from nothing: reading a mailbox is not writing from it, and marking mail reaches the user's own server rather than a stranger's. It covers send_email, which queues a message for a mailbox this deployment holds, and reply_to_email and forward_email, which queue one anchored to mail it already holds — those two also need mailfathom.mail.read, because an answer is derived from the message it answers. It covers get_outgoing_email and cancel_outgoing_email as well, which report what became of a queued send and stop one that is still waiting: a caller may read back and withdraw exactly what it was allowed to queue, and what this mailbox has written to whom is not something the reading grant confers. It covers send_draft, which queues the message a draft holds, and the promotion beneath it, because promoting a draft is asking for mail to leave. On the client endpoint it reaches POST /api/client/drafts/{draftId}/send and the outbox routes, which are the same act and the same reading back and withdrawal the tools above are, plus a paging over the caller's own queued sends that no tool offers — an enumeration is a person's screen rather than an agent's. It is asked for again by the use cases behind all six and by the outbox beneath the four that send, so it governs the act rather than only the tool
mailfathom.mail.accounts.write user-facing Maintaining the signed-in user's own record: POST /api/client/record, POST /api/client/record/mail-accounts/folders, POST /api/client/record/mail-accounts/folders/replacement, and POST /api/client/record/mail-accounts/folders/removal, which save the whole record, and declare, restate, and withdraw one folder of one mailbox assigned to that user. The three folder routes reach no mail server, which is ADR 0007: a folder here is a mapping this deployment reads under, so declaring one says which remote path to read and withdrawing one says to stop reading it, and neither renames nor deletes anything on the server. It is separate from mailfathom.mail.read for the reason every write here is: reading somebody's mail is not deciding what this deployment reads out of their mailboxes. It reaches that user's record and no other — the routes name nobody, so the caller's own identity is the whole of whose record is changed. It declares no mailbox, assigns none to anybody, and ends no assignment: which mailboxes a person has is administrative, and ending an assignment takes mailfathom.admin.erase. Nothing under this name reaches anybody else's row: recording a user, relabelling another one, and erasing one are administrative, and no user-facing grant lists who else this deployment serves. What a person is called, which zone their days are read in, what they set about their client, and the picture they are drawn by are not part of it: those are mailfathom.profile.write, so that somebody whose mailboxes an administrator maintains still keeps their own profile. It publishes no MCP tool
mailfathom.mail.folders.write user-facing Creating, renaming, moving, and deleting the folders of any account the signed-in user holds: POST /api/client/managed-folders, POST /api/client/managed-folders/renames, POST /api/client/managed-folders/moves, and POST /api/client/managed-folders/deletions. Where the mailbox is MailFathom's own the act is a local commit, and where it is mirrored from a source server the same act runs on that server — so this grant does reach a mail server, and on a mirrored account it is what lets somebody issue CREATE, RENAME, and DELETE there. It is separate from mailfathom.mail.move because what it changes is where mail can be filed rather than where one message is, and a deletion takes the mail with it — inside the trash of a held account it erases the folder with every message in it, and on a mirrored account the account's own deletion setting decides whether the folder goes off the server as well. Reading the folders is mailfathom.mail.read, like every other read here. Each change is written to the service log as an audit record naming the account, the folder's identity, and the kind of change, never the folder's name. It publishes no MCP tool
mailfathom.contacts.read user-facing list_contacts and get_contact, which read the books the caller's user reads — their own, and the collected book of each mail account assigned to them: names, addresses, and the notes a user wrote about identified third parties. On the client endpoint it also reaches the contact routes that read — GET /api/client/contacts, which pages the people the signed-in user wrote down, GET /api/client/contacts/collected, which pages the people their own mailboxes picked up, and GET /api/client/contacts/{contactId}, which reads one of them. They are the same reading the two tools are, split into two pages because an address book and a list of everybody ever written by are different things on a screen. There is no export here: that stays administrative, because it is what a data-subject request is answered from It is also half of what GET /api/client/contacts/{contactId}/correspondence asks: that route reads one contact out of those books and then correlates their addresses with the mail this caller already holds, so it is published under mailfathom.mail.read and refused for a caller missing either — reading somebody's mail is not reading who their correspondents are, and the answer carries both
mailfathom.contacts.write user-facing create_contact, update_contact, delete_contact, and promote_contact, which record, amend, erase, and take on a person across the books the caller's user reads. Recording and amending reach that user's own book alone, and promotion writes the caller's own copy of a record one of their mail accounts collected. Erasing does not: delete_contact reaches whichever of those books holds the person, so erasing a collected record takes it out of the mail account's book for every user assigned that account. The erasure is here rather than apart, because a grant that cannot edit the book cannot be trusted to take somebody out of it — and that is what this one grant reaches beyond the caller's own book. On the client endpoint it also reaches the four contact routes that write — POST /api/client/contacts, PUT /api/client/contacts/{contactId}, POST /api/client/contacts/{contactId}/promotion, and DELETE /api/client/contacts/{contactId} — which are the same four acts the tools are, performed by the person rather than for them. The administrative surface's bulk erase of a whole collected book is not among them: emptying what one mailbox picked up is an act about the mailbox that an operator takes
mailfathom.tasks.read user-facing Reading the signed-in user's own task list — the three reads among the task routes: the tasks they wrote down, the ones their mail proposed, and one task by its identifier. A task is this deployment's own record of what one person owes rather than anything in a mailbox, which is why it is not mailfathom.mail.read: a credential given a mailbox to read has not thereby been shown what its owner intends to do, and a credential that keeps somebody's list needs to read no mail to do it. The message a task cites is a value the task carries, so reading the task reads no mail and opening that message is the mail grant's. It is also what the day-layout suggestion and the Agent's task-reading tool ask beneath mailfathom.assistant.use. It publishes no MCP tool
mailfathom.tasks.write user-facing Changing that list — the five writes among the task routes: recording a task, editing one, completing one, accepting what mail proposed, and erasing one, which is also how a proposal is dismissed. None of them reaches a mail server or moves anything in a mailbox, which is why erasing a task is not mailfathom.mail.delete. It carries no read of its own: a credential granted it alone records a task and cannot list one. It is also what accepting a task the Agent proposed asks beside mailfathom.assistant.use. It publishes no MCP tool
mailfathom.calendar.read user-facing Reading the signed-in user's own calendar — the two reads among the calendar routes: a window of events, and one event by its identifier. An event is this deployment's own record of when one person is committed, read from no mail server and no calendar server. What each read answers with is bounded by how many events it may carry rather than by how long the window is, and a window outside that bound is refused rather than answered short. It is also what the day-layout suggestion and the Agent's calendar-reading tool ask beneath mailfathom.assistant.use. It publishes no MCP tool
mailfathom.calendar.write user-facing Changing that calendar — the four writes among the calendar routes: putting an event on it, amending one, accepting a date their mail proposed, and removing one, which is also how a proposal is dismissed. It is also the whole of what the two calendar import routes ask: a file somebody was handed reaches this person's own calendar and nothing else, and confirming it creates the events its summary named — the same act as putting one there by hand, performed over a file rather than a form. The summary route writes nothing and is published here anyway, because what it reads is the caller's own upload rather than their calendar, and it exists only as the first half of an import. Nothing an entry in such a file names is fetched, so neither route reaches a mail server, a calendar server, or any other address. It carries no read of its own. It is also what accepting an event the Agent proposed asks beside mailfathom.assistant.use. It publishes no MCP tool
mailfathom.notifications.read user-facing Reading the signed-in user's own notification centre — the two reads among the notification routes: a page of what happened, and the count of what is unread. A notification is what this deployment drew for one person; it is derived from their mail and it is not their mail, so it has a grant of its own and the message one points at is opened under mailfathom.mail.read. It is also asked, beside mailfathom.mail.read, before a signal ticket is minted, because the channel that ticket opens announces a notification by its headline. It publishes no MCP tool
mailfathom.notifications.write user-facing Changing that centre — the three writes among the notification routes: marking one notification read or unread, marking all of them read, and taking rows out of the centre. None of them reaches a mail server or moves anything in a mailbox — the message a notification points at stays exactly where it is, which is why erasing one is not mailfathom.mail.delete — so a person whose mail accounts an administrator maintains clears their own bell under a grant that says nothing about those accounts. It carries no read of its own: a write is answered what it changed and how many notifications it left unread, and nothing else of the centre. It publishes no MCP tool
mailfathom.profile.read user-facing Reading what this deployment records about the signed-in user themselves rather than about their mail: GET /api/client/display-name, which is the name they are recorded under with whether a change of it would be accepted, GET /api/client/time-zone, which is the zone their days are read in, GET /api/client/preferences, which is what they set about their own client, and GET /api/client/portrait, which is the picture they are drawn by. It is not mailfathom.mail.read because none of it is mail, and it is not the record: what this deployment reads for somebody out of their mailboxes stays under mailfathom.mail.read and mailfathom.mail.accounts.write. It publishes no MCP tool
mailfathom.profile.write user-facing Changing those four things: POST /api/client/display-name, the write to /api/client/time-zone, the write to /api/client/preferences, and replacing or removing the portrait. It is deliberately not mailfathom.mail.accounts.write: that grant decides what this deployment reads out of somebody's mailboxes, somebody whose mail configuration an administrator maintains in full does not hold it, and what a person is called, drawn by, or reports about their own client must not hang on a grant over their mail configuration. It writes the caller's own row and no other — the routes name nobody — and a write the grant admits may still be refused for a reason that is not the grant: a configuration source that still declares that person, or a settings policy that holds the setting, which the section for each route states. It carries no read of its own: a save of the preferences is answered the document it stored, with the telemetry answer already held carried into it wherever the write does not decide one. It publishes no MCP tool
mailfathom.assistant.use user-facing Every act that sends something of the caller's to a chat provider and is charged to the deployment's answering allowance, which is the decision this grant carries and the whole of it: it reads nothing on its own, so each act below asks beneath it for the grant that reads what it sends. The first is ask_mail, which answers from mail content by sending it to a model provider, and which therefore asks for mailfathom.mail.read as well. On the client endpoint it also reaches the three Discover routes — POST /api/client/discovery/runs, which asks a question of the user's mail, GET /api/client/discovery/runs/{runId}, which reads the run answering it, and DELETE /api/client/discovery/runs/{runId}, which stops it. All three are the same act as the tool and are therefore published under the same grant, the reading and the stopping routes included, and starting a run asks for mailfathom.mail.read beneath it exactly as the tool does: what each of them touches is a question that was asked under this one, so a run belongs to the user who asked for it and somebody else's reads as no such run whether it is being read or stopped, on whichever replica answers the request. Stopping is published here rather than under a write grant because it ends work this deployment was doing and changes nothing in a mailbox. It also reaches the two phrasing routes — GET /api/client/emails/search/phrasing, which says whether this deployment reads a typed sentence at all, and POST /api/client/emails/search/phrasing, which reads one into filters somebody can see and correct. Neither searches anything, and what makes them this grant rather than the reading one is where the sentence goes: it leaves the deployment for a chat provider and is charged to the same allowance a question is. A caller holding mailfathom.mail.read alone is answered 403 and searches by the words they typed, which is the same search a deployment with no provider serves; the sentence is the caller's own text rather than mail, so nothing is asked beneath this grant here. It reaches the two reply drafting routes on the same reading — GET /api/client/replies/drafting, which says whether this deployment drafts a reply at all, and POST /api/client/replies/drafting, which drafts one out of the conversation being answered. Neither sends, queues, or stores anything, and what makes them this grant rather than a writing one is where the mail goes: the conversation and a sample of the account's own sent mail leave the deployment for a chat provider, charged to the same allowance a question is — so drafting asks for mailfathom.mail.read beneath this grant, and the route that only says whether a reply is drafted answers on this grant alone. The cleaned message body route is the same pair for the same reason: the body it reduces is mail, and reducing it is a chat provider's work. It reaches GET /api/client/contacts/{contactId}/relationship on the same reading: it reads the correlation an opened contact is drawn beside into a short note about where that correspondence stands, and the subjects and file names of it leave the deployment for a chat provider, charged to the same allowance a question is. It asks for the two grants that correlation needs as well — mailfathom.mail.read and mailfathom.contacts.read — so a caller holding this one alone is refused naming the one they are missing, and a deployment that derives no card answers that it derived none rather than refusing. It reaches the two calendar event drafting routes on the same reading — GET /api/client/calendar/drafts, which says whether this deployment reads a typed description at all, and POST /api/client/calendar/drafts, which reads one sentence into the event it describes. Neither writes to a calendar and neither stores anything: what makes them this grant rather than a writing one is that the sentence leaves the deployment for a chat provider and is charged to the same allowance a question is, and a caller without this grant fills the dialog's fields in themselves. The sentence is the caller's own text, so nothing is asked beneath this grant, and putting the event it describes on the calendar is mailfathom.calendar.write when the dialog is saved. It reaches the two day-layout routes on the same reading — GET /api/client/tasks/today/layout, which says whether this deployment arranges a day at all, and POST /api/client/tasks/today/layout, which suggests how the tasks owed today could sit around what is already on the calendar. Neither writes anything — no task is moved, no proposal accepted, and no event created — and what makes them this grant rather than the reading grant the list itself is served under is where the lines go: the task titles and the titles of the day's commitments leave the deployment for a chat provider, charged to the same allowance a question is. The arrangement asks for mailfathom.tasks.read and mailfathom.calendar.read beneath it as well, since the tasks owed and the day's commitments are those grants' own records, so a caller holding this one alone is refused naming the one they are missing — while the route that only says whether a day is arranged reads neither and answers on this grant alone. It reaches the ten Agent conversation routes on the same reading — the history, searching it by words and by meaning, one conversation read from a cursor, asking, steering and stopping a running answer, accepting or declining a proposal, archiving a conversation and restoring it, and deleting one. A conversation is the person's own questions about their mail and the answers quoting it, so reading it is this grant rather than the reading one, and nothing but accepting a proposal changes anything outside the conversation: accepting carries out the act the Agent proposed, so it asks for that act's own grants beside this one — mailfathom.mail.drafts.write and mailfathom.mail.send for a new message, mailfathom.mail.read as well for an answer to one, mailfathom.calendar.write for an event, and mailfathom.tasks.write for a task — and a caller missing any of them is refused before the decision is recorded. The answer the Agent composes is offered a tool per grant the caller holds rather than every tool it has: the ones that search and read mail under mailfathom.mail.read, the one that reads the calendar under mailfathom.calendar.read, the one that reads the task list under mailfathom.tasks.read, and a proposing tool only where the caller's grant could carry the proposal out. So a caller holding this grant alone converses with a model that can read nothing of theirs. It implies no reading grant, and it is no reading grant's weaker sibling: every act it reaches hands what the grant beneath it reads to a provider outside the deployment
mailfathom.admin.read administrative The reads reporting the deployment's own state and no mail: what synchronization is doing per account and per folder, embedding status and the activation preview, the loaded rules, a run's progress, what a rewind would cost, where a re-derivation has got to, the stopped-job list, the outbox counted by stage and listed without naming anybody, and which users this deployment holds records for, what each of them signs in with, and what each one's record declares, and the settings policy the deployment and each organization holds, beside the user, mail account, and organization records this deployment will not read. The roster and the user records are here and nowhere else: no user-facing grant reads them, so a person signed in to this deployment cannot learn who else it serves. It also reads the deployment's own configuration — the three routes under /api/admin/configuration, which report every setting the deployment composed with the layer that decided each one, the persisted document an editing session opens, and what an adoption would copy. Read without a prefix that is the whole composed configuration: authorization-entry names, OAuth issuers and authorized subjects, provisioned file paths, mail account addresses, and folder mappings. A secret-bearing setting and a bootstrap-only one report the redaction marker rather than their value, and so does a variable of the host process that no MailFathom section names — but the rest is read in full, so a credential holding this name is one that may read how the deployment is put together
mailfathom.admin.audit.read administrative Everything derived from somebody's mail: the mailbox-mutation audit, the answering audit, the rules history, the spam classifications, one queued message with the addresses it is offered to, and reading the contact book — a listing, one person, or their export
mailfathom.admin.operate administrative Asking the deployment to do work it can already do: running rules over an account, classifying an account, retrying or dropping a stopped job, cancelling a reindex, rewinding synchronization, re-deriving stored mail, carrying stored content into the object backend, withdrawing or re-queueing one queued message, and writing to the contact book
mailfathom.admin.credentials.write administrative Minting and withdrawing the ways into a mailbox: storing a mailbox refresh token, and provisioning, rotating, suspending, or removing a user's username and password. Reading which credentials exist is mailfathom.admin.read, so a credential granted the state reads has not thereby been given one that can sign in as somebody
mailfathom.admin.spend administrative Activating the declared embedding model, which is the one operation that starts a provider bill
mailfathom.admin.erase administrative Disposing of what this deployment holds: the mail stored for a folder an account no longer mirrors, one person and everything the contact book derived from them, the database copies a finished move left beside the objects it verified, and a user together with every message, folder, attachment, and derived index this deployment holds for them. That last one is why erasing a user is not mailfathom.admin.configuration.write: recording somebody decides what the deployment reads next, and removing them destroys what it already read
mailfathom.admin.custody.write administrative Deciding which copy of one account's mailbox is the truth: reading it is mailfathom.admin.read, and changing it is this. Switching an account into holding its mailbox is the one administrative act here that ends with a mail server no longer holding a copy of somebody's mailbox, so it is a name of its own that neither the configuration writer nor the erasure grant confers — a credential that may rewrite settings must not thereby be able to empty a source server. Every switch is written to the service log as an audit record naming who asked, the account, the value it moved from and to, and every reason a refused one was refused. No configuration value changes an account's custody, which is ADR 0034. It publishes no MCP tool
mailfathom.admin.export administrative Carrying a whole mailbox, or one folder of it, out of this deployment as an archive: measuring what an export would carry, starting one, following it, downloading the finished archive, cancelling one still being written, and deleting one before its retention ends. It is a name of its own that no reading grant confers, because reading a message and carrying an entire mailbox away are different acts with different consequences — the archive is the mail, the folder structure, the flags, and the keywords, in a form a person opens on their own machine. It sits on the administrative surface because that is the surface the routes are served on, and the client offers no export at all, which is ADR 0028. The archive of a drained mailbox is the operation
mailfathom.admin.configuration.write administrative Changing the deployment's own persisted configuration: persisting a setting, stopping the document carrying one, saving an edited document, and adopting what the files decide beneath a path. It also covers who this deployment serves and what it reads for them — recording a user, relabelling one, saving one user's record, and declaring or withdrawing a mailbox in it — and saving the settings policy the deployment or an organization holds, which governs the record of every user and every mail account in its scope from the commit that stores it. Reading the settings, the records, and the policies is mailfathom.admin.read, so a credential may be told where a value is decided without being able to decide it
mailfathom.admin.roles.write administrative Deciding who holds what: defining, renaming, editing, and deleting a role, recording, renaming, and deleting a group and changing who belongs to it, and giving and revoking role assignments. Defining a role is the deployment's alone, so it needs this name at the deployment scope, which is the root: its holder can write themselves any name. Held over one organization it reaches that organization's groups, their members, and the assignments inside it, and never gives a name its holder does not hold there, nor a role that lists a pattern, which the root alone gives. Reading roles, groups, assignments, and why a user holds each name is mailfathom.admin.read; administering roles, groups, and assignments holds the rules

Three surfaces draw on those two halves. The MCP endpoint and the client endpoint each draw on the user-facing half — the client reads the mail an agent reads, and a second vocabulary for one authority would be two things to keep in step — and the administrative endpoint draws on its own. Every rule below that says a grant belongs to the surface it is written on means the half that surface draws on, so a name written on one user-facing endpoint is refused on the administrative one and accepted on the other.

A domain is a kind of record, and that is what keeps a grant from meaning more than its name. Tasks, the calendar, the notification centre, and a person's profile are each this deployment's own record rather than anything in a mailbox, so none of them is read or changed under a mail grant: mailfathom.mail.read shows a credential a mailbox and nothing its owner wrote beside it, and a credential that keeps somebody's task list needs no mail grant to do it. Each of those four has a reading name and a writing name, and holding the first never confers the second — the same separation the mail grants make, for the same reason. What decides the domain is where the record lives, not what it was derived from: a notification and a proposed task are both drawn from mail and are both this deployment's own rows.

No permission implies another, so a credential that needs to read state and to run rules is granted both names. An implication table would be a second set of rules to keep true, and writing two names is cheaper than remembering which one carries which. mailfathom.assistant.use is the worked example, because it is the one name that reads nothing: it is the decision that something of the caller's may go to a chat provider and be charged to the deployment's allowance, and every act it reaches asks beneath it for the grant that reads what is sent — mailfathom.mail.read to ask a question of mail, mailfathom.tasks.read and mailfathom.calendar.read to have a day arranged. A caller missing either half is refused naming the one it is missing. Withholding it is what stops a caller's records going to a chat provider, which is not the same as making mailfathom.mail.read egress-free — a deployment with semantic retrieval configured places the caller's own query text with the embedding provider before anything is read back.

mailfathom.mail.flags.write is separate from mailfathom.mail.read for the reason no permission here implies another, and the separation is the useful one on this surface: reading a mailbox and changing it are different acts with different consequences, and only the second is visible to the user in the client they open. It carries no read of its own either — a credential granted it and nothing else can change an email it can name and cannot list one.

mailfathom.mail.move is separate from mailfathom.mail.flags.write because those two writes fail differently. A wrong flag misdescribes mail the user can still find in the folder they left it in; a wrong move puts the mail somewhere else, and against a server without the MOVE extension it is a copy followed by a delete, which is the one act on this surface that can lose a message outright if it stops half way. A deployment that lets a client mark mail read has therefore not thereby let it refile the mailbox.

mailfathom.mail.delete is separate from mailfathom.mail.move on the same reading carried one step further. A move the user did not want is undone by moving the mail back, because the mail is still somewhere; a delete asks the server to expunge the occurrence, and nothing on this surface puts it back once it has. So a deployment that lets a client file mail has not thereby let it destroy any. It is also the one grant here whose act the client both confirms beforehand and holds for a moment afterwards: a delete written on the client surface waits out the person's own notification before anything reaches the server, which is the only way back an act that cannot be reversed can have.

mailfathom.mail.send is separate from all three for a stronger version of the same reason. A flag change reaches the user's own mail server and is undone in their own client with the gesture that would have made it; a send reaches somebody else's mailbox and nothing here can take it back. So the grant that reads a mailbox does not carry it, the grant that writes to one does not either, and it carries no read of its own: a credential granted it and nothing else can send from an account it cannot list.

mailfathom.mail.drafts.write sits between the two and is the reason the pair is not one name. Writing a draft is authoring mail and is the half that reaches nobody: the message goes into the user's own drafts folder, the user reads it in the client they already open, and deleting it takes it back. So a deployment that wants an agent to prepare mail for a person to send grants this name and withholds mailfathom.mail.send, and the agent is then offered save_draft, update_draft, and delete_draft and is not offered send_draft at all. It carries no read of its own either, which matters more here than elsewhere: a draft answering stored mail is composed from that mail, so a deployment that means an agent to draft replies grants mailfathom.mail.read beside it, and one that grants this name alone gets an agent that can write a message of its own and cannot answer anything.

The contact permissions are separate from the mailbox ones and from each other, because the book is a different body of personal data from the mail: an assembled record about identified third parties rather than correspondence that arrived, and a credential that may look somebody up is not thereby one that may erase them. On the administrative half the ten names are allocated so that the separations an operator would plausibly want are the ones they can make: reading state, reading what was derived from mail, causing work, placing a credential, starting a bill, destroying what the deployment holds, deciding which copy of a mailbox is the truth, carrying a mailbox out, changing what the deployment itself is, and deciding who holds what.

A name is published when the capability exists. Adding one is a configuration-schema change under ADR 0004, made when there is an operation for it to govern rather than ahead of one, because a grant naming a capability the deployment does not have is a grant that means nothing.

The operation rather than the tool is what that rule counts, and mailfathom.mail.send is the worked example of it. It was published while no tool required it, because the use case that writes a send down already existed, was reached, and refused a caller that did not hold the name; send_email then changed what the same grant reaches rather than what an operator has to write. A name allocated that way governs something from the day it is published, which a name reserved for a capability nobody has written would not.

Which tool each name covers

Each MCP tool declares the one permission required to reach it, and a caller is served only the tools its grant permits. MCP tools describes what that does to a listing and to a call.

Tool Permission it requires
list_accounts mailfathom.mail.read
list_emails mailfathom.mail.read
get_email_content mailfathom.mail.read
search_emails mailfathom.mail.read
set_mail_flags mailfathom.mail.flags.write
send_email mailfathom.mail.send
reply_to_email mailfathom.mail.send, and mailfathom.mail.read beneath it
forward_email mailfathom.mail.send, and mailfathom.mail.read beneath it
get_outgoing_email mailfathom.mail.send
cancel_outgoing_email mailfathom.mail.send
save_draft mailfathom.mail.drafts.write, and mailfathom.mail.read beneath a draft that answers stored mail
update_draft mailfathom.mail.drafts.write, and mailfathom.mail.read beneath a draft that answers stored mail
delete_draft mailfathom.mail.drafts.write
send_draft mailfathom.mail.send
ask_mail mailfathom.assistant.use, and mailfathom.mail.read beneath it
list_contacts mailfathom.contacts.read
get_contact mailfathom.contacts.read
create_contact mailfathom.contacts.write
update_contact mailfathom.contacts.write
delete_contact mailfathom.contacts.write
promote_contact mailfathom.contacts.write

The six rows naming mailfathom.mail.send are the ones worth reading twice. It is the only grant here whose effect leaves this deployment and cannot be recalled, and the mapping is what withholds those tools from every other credential: a caller without the name is not offered the descriptor and is answered as if the tool did not exist. Two further checks stand behind it — the use case, and the outbox it writes through — so an entrypoint added later meets the same refusal without passing this table.

get_outgoing_email and cancel_outgoing_email take the sending grant rather than the reading one, and that is the disclosure decision rather than a convenience. What a read of a queued send answers is who this mailbox wrote to and when a server accepted or refused each of them, which is a fact about the mailbox's outgoing correspondence rather than about mail it received — so a credential given a mailbox to read is not thereby one that learns it, and there is no listing on that surface to reach it through in bulk either. Withdrawing takes the same name from the other direction: what a caller may stop is exactly what it was allowed to start, so no grant of its own is minted for taking back what one grant already permitted. Both are additionally confined to what the calling principal queued, which is a scope rather than a permission: a send another caller queued is answered exactly as one nobody queued, and no grant widens that.

ask_mail names a second grant for the reason every act under mailfathom.assistant.use does. The descriptor declares the asking grant, because sending content to a chat provider is the decision that grant carries, and the use case beneath asks for mailfathom.mail.read as well, because the content it sends and the answer it cites are mail. A credential holding the asking grant alone is offered the tool and refused by the use case behind it, exactly as the two rows below are.

reply_to_email and forward_email name a second grant too, and it is a requirement rather than a note. The sending grant is what the descriptor declares and what narrows the listing, because sending is the effect that leaves. What the use case beneath asks for as well is mailfathom.mail.read, since an answer is derived from the message it answers — it quotes it, threads it, addresses it from its headers, and carries its files. No permission here implies another, so a credential holding only the sending grant is offered both tools and refused by the use case behind them: a deployment that means an agent to reply grants both names on the same entry. Which of the two refused is not a distinction the caller is given, and the deployment's own counter and warning are where it is read.

Which administrative route each name covers

Every administrative route publishes the one permission it requires as endpoint metadata, and what the endpoint serves states it route by route beside what each route does. Two consequences of that mapping belong here rather than to any one route.

Twelve mfctl commands make two requests and therefore need two permissions, because what such a command reads is what it puts in front of you or amends from:

Command Needs
mfctl contact update, mfctl contact add-address, mfctl contact remove-address mailfathom.admin.audit.read beside mailfathom.admin.operate
mfctl contact delete mailfathom.admin.audit.read beside mailfathom.admin.erase
mfctl mailbox rewind mailfathom.admin.read beside mailfathom.admin.operate
mfctl content move mailfathom.admin.read beside mailfathom.admin.operate
mfctl content release mailfathom.admin.read beside mailfathom.admin.erase
mfctl embedding activate mailfathom.admin.read beside mailfathom.admin.spend
mfctl config set, mfctl config unset, mfctl config edit, mfctl config adopt mailfathom.admin.read beside mailfathom.admin.configuration.write

A credential granted only the permission the operation itself is published under meets the refusal at the first request and nothing is done — the safe half of it, and still not what the operator intended.

The four configuration writes read for a reason of their own: what they read carries the version the change is composed over, and a version fetched apart from the values it describes is the lost update the deployment's version guard exists to refuse. mfctl config get and mfctl config show make one request and need mailfathom.admin.read alone.

A command acting for a user makes one more request when the invocation names none. Every mfctl user command but list and add takes --user, and does not need it on a deployment holding one person: without it the command reads the roster and acts for the sole user it finds, which is one mailfathom.admin.read request beside the permission the act itself is published under. Passing --user skips that lookup and nothing else — the named user is sent as written, and the deployment refuses one it holds no record for.

Skipping the lookup is not the same as making the command need one permission. Five of them read something else unconditionally, whether or not --user was passed, so each needs mailfathom.admin.read beside its own name in every invocation:

Command Reads, before the act
mfctl user show the record it prints
mfctl user edit the record the editing session opens, and the version what you saved is committed against
mfctl account edit the declaration the editing session opens, and the version what you saved is committed against
mfctl user remove the roster, so the confirmation names the person being erased

mfctl credential delete reads the credential listing too, to name what it is about to delete, and is the one command that goes on without it: a caller refused that read is told which credential it holds no name for and deletes it anyway.

GET /api/admin/session sits outside the model and needs no permission. It reports the credential the caller already presented, the version this deployment already publishes, the permissions that credential holds, and the user it belongs to with the roles that user holds and the scope of each, all of which the caller brought or may always ask about itself; and it is what every command reads first, mfctl login included. Requiring a permission for it would make that permission a component of every administrative grant, so a credential granted only the spend permission could not sign in to use it. A credential granted nothing therefore still answers here and nowhere else; an operator who wants nothing answered at all removes the entry.

The outbox is split by what a reading names

Its five routes take three of the names, and the line between the first two is drawn by what the answer contains rather than by what the request asks for. Counting the stages and listing what is queued are mailfathom.admin.read, because neither answer names a recipient or a subject; reading one queued message is mailfathom.admin.audit.read, because it reports the addresses the message is offered to and what each of their servers said; withdrawing one and offering one again are mailfathom.admin.operate, because both change what leaves the deployment and the second may put a copy in somebody's mailbox.

A monitoring credential granted mailfathom.admin.read therefore watches an outbox it is never served an address from, which is the arrangement the split exists for.

The contact book draws from both halves

The book is reachable from both surfaces, and it needed a name of its own on neither. On the administrative surface, reading the book, reading one person, and exporting them are mailfathom.admin.audit.read, because what the book holds is derived from mail; recording, amending, and promoting are mailfathom.admin.operate; erasing somebody is mailfathom.admin.erase. What the book needed was not a name of its own but for each of its routes to be placed against the separations the others already draw.

Recording, amending, promoting, and erasing a person are performed by the contact tools and by the signed-in user's own contact routes as well as by those routes, so the use case behind them admits the administrative name or mailfathom.contacts.write. The two halves are disjoint, so requiring one of them would leave the act reachable from mfctl and refused from every agent and every client. It is an alternative rather than a widening, and it stops where the act does: exporting somebody is named for the administrative surface alone, because that is what a data-subject request is answered from, and so is emptying a whole mailbox's collected book. MCP tools and the client endpoint are what the other half publishes.

Writing a grant

What a user may do is granted to the user, through roles. The deployment records roles, groups, and role assignments, and seeds three roles — Mail user, Organization administrator, and Administrator — when it is migrated. A user's credential then narrows what the user holds rather than granting it, on the administrative endpoint as on the mail surfaces. The stored schema describes the tables and what each seeded role lists.

How a caller's grant is computed

A user's grant is the union of every assignment that reaches them: the ones naming the user, and the ones naming a group the user belongs to. Each permission a role grants — one it lists by name, and one a pattern on its list reaches in the build answering — is held at the scope of the assignment that gave it — the deployment, one organization, or one user — and a permission two assignments give is held at both scopes. There is no deny and no order between assignments, so adding one can only add, and the only way to take a permission away is to revoke, narrow, or delete what gave it. A name a stored role lists that this build does not publish grants nothing, and neither does a stored pattern reaching nothing it publishes.

A caller on a mail surface holds that grant kept to what its credential names, and then, on an entry with PermissionsFromTokenScopes, to what its token's scopes carry. Each of those only keeps names: a name the credential lists that the user's roles do not grant grants nothing, and a name kept stays at every scope it was held at. The administrative half of a user's grant is dropped on a mail surface, since no check there reads it. A surface requiring no credential has nothing to narrow with, so its caller holds what the user that deployment serves is granted on the user-facing half. A caller on the administrative endpoint holds the same grant narrowed by its credential and its token the same way, and is admitted only while that leaves at least one administrative name. It acts for nobody's mail, so a user-facing name in that grant performs nothing there; it is read only as the ceiling placing a credential and giving a role are bounded by.

A user-facing permission is held whatever scope gave it. It reaches what this deployment holds for its holder, and whose that is follows from the credential rather than from the grant — what a permission does not decide. An administrative permission answers a question naming no target only at deployment scope, so a caller granted mailfathom.admin.read or mailfathom.admin.operate over one organization alone is refused every route that names none — except the listings of users, of organizations, of mail accounts, of their synchronization status, of groups, and of role assignments, which never refuse over a scope and answer with what the caller's scopes cover, and the list of roles, which any holder of mailfathom.admin.read reads. A route naming a user, a mail account, a user's contact book, an organization, a group, or a role assignment may be answered at any scope covering it — the deployment, the organization it belongs to, or the one user it is wholly the concern of, which a mail account is only while it belongs to an organization and is assigned to that user and nobody else. A mail account in no organization is therefore covered by the deployment alone, and a user in none by the deployment and by a scope naming them. A grant held below the deployment names the routes that are and how a target outside the scope is answered.

What only the deployment scope grants

Some administrative operations are the deployment's alone, whatever target a caller's grant covers: an operation naming no target concerns every organization at once, and some that do name one reach beyond it. Each is admitted only to a caller holding its permission at deployment scope:

Permission Only at deployment scope
mailfathom.admin.read Every read of the deployment's own configuration, the deployment's own settings policy, the embedding status and the activation preview, the loaded rules, the stopped jobs naming no account, the outbox's counts and listing, and where a content move or a release of what one left behind has got to
mailfathom.admin.operate Cancelling a reindex, starting, pausing, and resuming a content move, and retrying or dropping a stopped job naming no account
mailfathom.admin.credentials.write Changing an organization's short name, a namespace unique across the deployment that every member's login is spelled in, and moving a user out of every organization
mailfathom.admin.spend Activating the embedding model, which is the whole of what the name covers
mailfathom.admin.erase Releasing the database copies a finished content move left behind
mailfathom.admin.configuration.write Writing the persisted configuration, saving the deployment's own settings policy, saving an organization's settings policy — or moving a mail account between organizations — where that changes what is served to an account naming a secret that was not provisioned for one of its own users, creating and deleting an organization, and recording a user or a mail account in no organization
mailfathom.admin.roles.write Creating, renaming, changing the permissions of, and deleting a role, which is defined once and assigned in every organization, and keeping a group in no organization or an assignment at the deployment scope

mailfathom.admin.audit.read, mailfathom.admin.export, and mailfathom.admin.custody.write have none: each operation they cover names the user or the mail account it concerns.

A caller holding one of these permissions only over an organization or a user is refused the operation in the administrative endpoint's usual shape, naming the permission and saying that it is held only below the deployment — what a refusal says shows the document. A grant below the deployment admits its holder to the endpoint, to its session route, and to the routes checked against what they name for the users, mail accounts, contact books, organizations, groups, and role assignments its scope covers; every other route asks its permission at deployment scope and refuses such a holder in that same shape.

Giving a role that lists a pattern is the root's alone as well, and is refused in a shape of its own. The routes that give a role and place a credential are answered at any covering scope for a role of names, so what decides is the role rather than the operation — a pattern in a role's list holds the rule and the refusal.

mailfathom.admin.spend held below the deployment reaches nothing. A role is assigned whole, so a role carrying it — the seeded Administrator among them — may be assigned over an organization or a user and grants its other names there. The spending name is not refused there, and it is not counted either: GET /api/admin/session and mfctl status report it apart from the rest of what that scope grants, so nobody reads it as a grant the deployment fails to enforce.

The grant is computed per request and remembered per user by each replica. A change to an assignment, a role's permissions, a group's membership, or a user's organization forgets what every replica remembered: the replica writing it at once, the others through the configuration change announcement where a backplane is declared, and within thirty seconds where none is or the announcement is lost. A client session holds no grant of its own — only what its credential named — so a revoked assignment reaches a session already signed in on its first request after the replica serving it has forgotten: at once on the replica that wrote the change, and within the bound above on every other.

Administering roles, groups, and assignments

Roles, groups, and assignments are written through the administrative endpoint, and roles, groups, and assignments lists the routes and the mfctl commands. Reading any of them is mailfathom.admin.read and writing any of them is mailfathom.admin.roles.write, each held at a scope covering what the act names — the group, the user, and the scope an assignment is made at.

A role is the deployment's vocabulary, so only the root defines one. Recording a role, renaming it, replacing the list it grants, and deleting it each need mailfathom.admin.roles.write at the deployment scope, and its holder may list any published name and any pattern reaching one. Granting that name at the deployment scope is therefore granting everything, because its holder can write themselves any name. Every holder of mailfathom.admin.read reads every role, wherever they hold it.

Held over one organization, the writing grant reaches that organization and nothing beside it. Its holder records, renames, and deletes groups in that organization, changes who belongs to them, and gives and revokes assignments whose principal and scope are both inside it. A group in no organization and an assignment at the deployment scope are the deployment's, so only a holder at the deployment scope writes them. A group, a user, or an assignment outside the caller's scope is answered exactly as one that does not exist, so naming somebody else's tells an organization's administrator nothing about it, and the listings answer with what the caller's scopes cover rather than refusing.

Nobody grants more than they hold, or wider than they hold it. Each refusal names the permission and leaves nothing written:

  • Assigning a role needs every name the role grants held by the writer at a scope covering the assignment's scope. A user-facing name's scope is never read, so it needs only to be held somewhere. mailfathom.admin.spend has no operation below the deployment scope, so giving it at a narrower scope gives nothing and is not asked about.
  • Adding a user to a group is receiving every assignment the group holds, so it needs every name those assignments give held by the writer at a scope covering each of them, under the same two allowances.
  • Giving a role that lists a pattern — assigning it, or adding a member to a group an assignment gives it to — needs the root on top of both, whatever scope the write names, because what a pattern comes to hold is nothing its giver holds today. A pattern in a role's list holds that rule.
  • Revoking an assignment and removing a member need the coverage and nothing held, because taking a grant away widens nobody.

A role or a group something is still assigned is not deleted. The refusal says how many assignments still stand on it, so the operator revokes each of them first; deleting one silently would take what it gave from everybody it gave it to.

Three writes cannot take the last root away. Revoking the last assignment that gives mailfathom.admin.roles.write at the deployment scope to a user who still holds it, replacing the list of the last role giving it there with one that no longer does, and removing the last member through whom a group gives it are each refused with 409, because a deployment nobody can administer is recovered only through its database. A role gives the name by listing it or by listing a pattern that reaches it — *, mailfathom.admin.*, mailfathom.admin.*.write — and either counts as holding the root. The check and the write share one transaction under a lock on every role giving the name, so two administrators each removing a different root at once cannot both succeed. Give the name to somebody else first. Erasing a user is not one of the three, and neither is moving one: erasing the last user who holds the name removes their assignments with them, moving them out of the organization whose group gives it to them ends what that group gave, and neither is refused, so check mfctl user permissions for another holder before erasing or moving an administrator.

mfctl user permissions explains a user's grant, within your own scope. For each name the user holds it reports the role it came from, whether that role lists the name itself or a pattern reaching it, whether it was given directly or through which group, the scope it is held at, and whether that scope makes it reach nothing; then, for each of the user's credentials, what that credential keeps of what was listed. It needs mailfathom.admin.read over the user, and it reads the assignments its caller could already list: a name the user holds through a group or at a scope the caller's grant does not cover is left out, so an organization's administrator reads that organization's part of a member's grant and nothing the deployment gave them. One explanation carries at most 1000 rows; past that it says it is a part of the answer, and mfctl assignment list pages the rest.

Every change is recorded. Each write that changed something is written to the deployment's log after it committed, as one line naming the act, the role, group, user, or assignment it changed, a role's new list where the act set one — each entry as it was written, a pattern as the pattern rather than as the names it reached that day — and the administrator it was admitted as. Adding somebody who is already a member and removing somebody who is not change nothing, so they are answered as a success and leave no line. No line carries a role's or a group's name, because the identifier is what stays the same across a rename.

A pattern in a role's list

A role's list takes a pattern beside the names it writes out. In a pattern * is a whole dot-separated segment standing for one or more consecutive segments, at any position and more than once:

Written What it reaches
mailfathom.admin.* Every administrative name
mailfathom.admin.*.write The administrative names ending in .write
mailfathom.*.read The names ending in .read in both halves, at whatever depth each sits
mailfathom.mail.* Every grant over mail, and nothing over contacts, tasks, the calendar, notifications, the profile, or the assistant
mailfathom.tasks.* Reading and changing the task list; the same shape reaches each other domain's pair
* The whole published set, both halves

A wildcard never stands for no segment, so mailfathom.mail.* reaches what is beneath that prefix and never the prefix itself. No pattern names the user-facing half on its own: that half is every domain but admin, and a pattern says what a name matches rather than what it does not, so a role meant to carry all of it lists one pattern per domain or the names themselves. It never shares a segment either: mailfathom.mail.c* is not a pattern, and is refused as the unpublished name it is.

The pattern is stored as it was written and resolved on every read, against the set the build answering publishes. So a role listing one widens on upgrade: a permission a later release publishes within the pattern's reach is held by everybody the role is assigned to from the release that publishes it, and nobody edits the role for that to happen. A role of names alone stays exactly as wide as somebody wrote it, whatever a release adds. While a rolling upgrade has two builds serving one database, each replica grants what its own build publishes in the reach, and nothing is rewritten when the newer one starts. Write a pattern where that widening is what you mean, and names where it is not.

A pattern has to reach something when it is written. One reaching nothing this build publishes is refused with 400, and the refusal tells it apart from a name nothing publishes, because the remedy differs — a name is misspelled or belongs to another release, while a pattern is well formed and has nothing beneath it. A stored pattern that comes to reach nothing, because a later build retired what it reached or the row was edited in the database, grants nothing and is reported beside the role exactly as a stored name no build publishes is.

What a pattern reaches is read back rather than worked out. mfctl role list prints each role's list as it was written and, beneath the listing, the names each pattern reaches in the deployment's build, and mfctl user permissions says of every name a user holds whether the role lists it by name or through which pattern. Roles, groups, and assignments shows both.

A role listing a pattern is given by the root alone. Nobody grants more than they hold, and what a pattern holds after the next release is nothing its giver holds today. So two writes need mailfathom.admin.roles.write over the whole deployment whatever scope the write names: assigning a role that lists a pattern, and adding a member to a group that any assignment gives such a role to. That is asked on top of the ordinary rule rather than instead of it — the writer still holds every name the role grants today, at a scope covering the assignment's. A stored pattern reaching nothing today counts, because the next upgrade may publish something in its reach. Revoking an assignment and removing a member widen nobody and are not asked this.

Placing a credential for a user who holds such a role needs the root as well. Provisioning, rotating, and enabling a credential are each a way in as that user, and that user's grant widens on upgrade, so the bound placing a credential already carries — every name the user holds today — does not bound what the credential comes to. Disabling and deleting one widen nobody and are not asked this.

Either write is refused below the root with 403 naming mailfathom.admin.roles.write and saying why it is asked of a write that may name one organization — what a refusal says shows the document — and nothing is written.

So an organization's administrator neither hands out a role that lists a pattern nor sets a password for a member who holds one. Where an organization's administrator has to manage somebody, give that person roles of names alone. Writing a pattern into a role is the root's already, since defining and editing a role are.

Of the three seeded roles, Administrator is the one that lists a pattern, and it lists * alone. Its holders — the default administrator admin among them — hold whatever a later release publishes, in both halves, from the moment that release runs. Mail user and Organization administrator list names, so an upgrade adds nothing to either: a name a later release publishes reaches their holders once somebody holding the root writes it into the role. A seeded role is an ordinary row, so one whose list an operator has changed lists what they wrote, and mfctl role list is where a deployment's own are read.

Nothing but a role's list takes a pattern. A credential's narrowing, a token's scopes, and a configured scope each name permissions exactly — on a user's credential says why for the first.

On a user's credential

What a credential keeps of its user's grant is named where the credential is provisioned, once per permission:

$ mfctl credential create --method api-key --user 6f1c… \
    --permission mailfathom.mail.read \
    --permission mailfathom.contacts.read

User credentials is where the command and its other options are specified. mfctl credential list reads back both halves for each credential: what it names, and what that leaves it holding under its user's current grant. A credential naming a permission its user's roles do not grant holds nothing by it, and the name is accepted rather than refused, because the user's grant moves while the credential's list does not: naming is a ceiling, and the grant itself comes from the user's roles. Names of both halves are accepted, and each surface reads the half it guards: on a credential presented on the administrative endpoint, --permission mailfathom.admin.read keeps it to reading the deployment's state, and a list naming no administrative name keeps it out of that endpoint altogether. The listing reports what is held of each half the credential is presented on.

Naming no permission records no narrowing, so the credential holds exactly what its user's roles grant of the half each surface it is presented on reads, now and after every change to them. What reaches it on an upgrade is what reaches its user: a permission a later release publishes is held through such a credential once a role its user holds grants it, which is an operator writing that name into a role, or the release publishing it within the reach of a pattern a role already lists — the one case where a release itself widens a grant. mailfathom.mail.send is the sharpest name such a credential holds wherever the user's roles grant it, since with it comes the ability to send mail from the user's address to anybody; mailfathom.contacts.write is the next, being the ability to record, amend, and irreversibly erase what this deployment holds about identified third parties. mailfathom.mail.drafts.write is milder for the reason it exists: what it adds is the ability to put a message in the user's own Drafts folder, which the user sees and can delete.

--no-permissions keeps nothing, which is how a credential is retired without deleting it: it still authenticates, and it is served an empty tool list. mfctl credential disable is the other way to close one, and it is the one to reach for when the reason may turn out to be nothing.

There is no pattern here, deliberately. A narrowing on a credential is written once, by somebody deciding what one client of one user may do, and read back from a listing that states names — so a shorthand that quietly widens on the next release would be answering a question nobody asked at the moment they provisioned. Where everything the user holds is meant, name no permission; where part of it is, write the part out. A pattern is written in a role's list and nowhere else, and one written here is refused as a name nothing publishes.

Provisioning refuses a narrowing that says something impossible, naming what was written: a name nothing publishes, and a name belonging to the administrative half — which a credential reaching one user's mail can never keep, and is refused with the user-facing half's own names written back.

A surface accepting a method it has no provisioned credential for admits nobody, which is not the same as an unauthenticated one. A surface with no Authentication entry at all serves every caller as the user the deployment serves, holding whatever of the user-facing half that user's roles grant, because there is no credential to narrow it with; that is the unauthenticated posture the startup warning already reports.

PermissionsFromTokenScopes narrows once more, by the token. Written on an entry accepting oauth-subject, a token then holds the published names its scopes carry and its credential names and its user's roles grant, so the authorization server decides per session within a bound the provisioning and the roles fixed. A scope naming anything else — openid, offline_access, another resource's scope — is ignored, and a scope naming a permission the credential does not hold grants nothing. It is written only on that entry, since no other method carries a token to read a scope from. What the metadata document advertises there is the surface's whole published vocabulary rather than a configured ceiling, because there is no ceiling in the section to read — those are the scope names to create in the authorization server, and advertising them widens nothing, since a token holds only the intersection with what its own credential names. Connecting an MCP client through your identity provider walks that setup.

On the administrative endpoint

An administrator is a user whose roles grant an administrative name, and the grant is the user's, read per request from the same assignments every surface reads. Who administers the deployment is where admission is described, and endpoint configuration where the keys are specified. The deployment's first start records the default administrator admin holding the seeded Administrator role at deployment scope, which lists the pattern * and so grants every name both halves publish, a name a later release adds included.

A caller here holds its user's grant, kept to what its credential keeps. A credential naming no permission keeps everything its user's roles grant, and one whose --permission list names mailfathom.admin.read alone reads this deployment and changes nothing. The user-facing names in that grant are kept as well, but only as the ceiling a credential written here and a role given here are bounded by: the caller acts for no user, so nothing on this endpoint performs one, and the session route reports none. A user holding no administrative name at any scope is not an administrator, and every credential they hold is answered 401 here.

PermissionsFromTokenScopes narrows once more, by the token. Written on an AdminEndpoint:Authentication entry accepting oauth-subject, a token holds the administrative names its scopes carry and its user's roles grant, so a token minted to read the deployment cannot change it. A scope naming a user-facing permission is kept as well, as the same ceiling and nothing more: a token without the user-facing names a user holds cannot provision, rotate, or enable a credential for that user, although the endpoint advertises only its administrative names. A scope naming anything else is ignored.

A permission name written into RequiredScopes or AdvertisedScopes is refused, on this endpoint's entries as on every other: requiring a permission at the door would close it on a caller the deployment meant to serve less, the grant that reads one advertises it already, and a scope is compared byte for byte at an authorization server, which can mint no pattern — so a value with a * segment covering permissions is refused there too. That refusal is what publishing a name costs an upgrade, and it is the one that stops a deployment rather than widening it. A name nothing publishes is an ordinary scope token, so an operator who minted a scope of their own with that spelling could write it in either list and start; the release that publishes the name turns the same value into a permission, and startup refuses it by name. The action is the one the refusal states: take the value out of the list, and grant the permission through a role instead.

What startup records

Startup records what every entry admits, one line each, so the posture is read on the first run rather than inferred later. A mail-serving entry reports the method it accepts and says that each caller holds what its user's roles grant, kept to the names its credential carries, and that mfctl credential list reads those names. An administrative entry reports the method it accepts from a credential listing admin and says that each caller holds what their administrative roles grant, kept to the token's scopes on an entry that reads them, and that a user holding none is refused; an administrative endpoint naming no entry says every caller acts as the default administrator admin. There is no grant in any section to report, because every grant is a role assignment. Nothing in the report names a key, a public key, a token, an authorization server, or a subject: what it states is what the deployment configured, never which credential was presented. The MCP endpoint and the administrative endpoint each carry the lines their surface produces.

Which names are published where

A credential's narrowing draws from the user-facing half, and a grant on the administrative endpoint from the administrative half. mailfathom.mail.flags.write, mailfathom.mail.move, mailfathom.mail.delete, and mailfathom.mail.send are the four worth naming rather than leaving to the ungoverned default: the first three write to the user's real mail server, the second of them being the one that can lose a message if it stops half way and the third the one that means to lose it, and the fourth is the only name in either half whose effect leaves the deployment and cannot be recalled.

What a refused caller is told

The three surfaces enforce the same grants and answer differently, because their callers are different.

The MCP endpoint says nothing. A caller is offered no tool its grant does not permit — tools/list omits the rest, composed per request and never cached — and a call naming one of the omitted tools is answered as a call naming a tool that does not exist: the same error, the same code, and nothing about the caller, the credential, the permission, or what a different caller would have been served. A message a client could tell apart would disclose the capability the listing just withheld, and there is no insufficient_scope challenge either, even where the grant came from a token whose authorization server could in principle mint one. A grant is not the only reason a tool is missing: a tool whose category this deployment does not publish is withheld from the same listing and refused with the same answer, so nothing tells a caller which of the two reasons applied — what this endpoint publishes.

The administrative endpoint names the permission and nothing else. A caller the grant does not admit is refused 403 in the endpoint's ordinary problem shape, stating the permission that would have sufficed and carrying it as a permission member, so mfctl can say what to grant — what a refusal says carries both shapes. The caller there is an operator at their own terminal rather than an agent, and a route publishing no decision is refused to everyone, which makes an omission a visible failure rather than an open route.

The client endpoint answers the same way, and for a reason of its own. Its caller is a page holding this person's own credential, and GET /api/client/session already answers that same caller with the whole of its grant — so naming what is missing from that list discloses nothing the caller could not already read about itself, while withholding it would leave somebody unable to tell a credential that needs re-issuing from a deployment that is broken. A route publishing no decision is refused to everyone here too, which is the property that matters most on the surface that returns mail.

Every surface records its refusals, and no answer is the record. A refusal is counted by mailfathom.authorization.refusals — by surface, by the tool or route refused, and by the permission that would have sufficed — with a warning beside it naming the credential the work was admitted as. On the MCP surface that record is the only place the boundary is visible at all, so a client that stopped working is diagnosed from it rather than from what the client received. A tool merely withheld from a listing is not recorded, because nothing was refused. Telemetry holds what each channel carries.

Where the check runs

The grant is enforced twice, and neither check replaces the other. The transport refuses cheaply, before a use case is reached, and it is the only place a decision can be reflected in what a caller is offered rather than only in what it is told. The use case behind each operation then asks the same question on its own, so an entrypoint added later — a rule action, a worker, a command, a second protocol — reaches the same refusal without passing any middleware. Who a use case is running for is how the grant reaches the code that acts on it, including the two principals that hold no permission at all: the process's own identity, and the signed capability an attachment download link carries.

What a permission does not decide

Which mailboxes a caller reaches. Every tool call resolves the accounts the credential's own user controls and refuses anything outside them, whichever method got the caller in, and no permission narrows or widens that. Which user it is follows from the credential rather than from the grant — which is exactly why a token has to resolve a mapped subject, since admitting a colleague of the same tenant on the strength of a valid signature would admit them to somebody else's mail.

Whose mail a caller is acting on. That is a second axis, and no name in the table above is on it. A caller admitted on the MCP surface or the client surface is admitted to act for one user, and every mailbox read is resolved against the accounts that user owns before any grant is consulted; a caller admitted on the administrative surface acts for no user at all, so a user-scoped use case refuses it however broad its grant. That is why no permission names an account and adding one would be the wrong repair: a grant says what may be done, and whose mail it may be done to is decided by what admitted the caller. A deployment may record several users and serve each of them the mail accounts they own, because every credential a mail-serving surface accepts names the user it admits. It is refused several only while the MCP endpoint or the client endpoint requires no authentication, since a caller that brought nothing names no user; the administrative endpoint is outside that bound, and the users a deployment serves holds the rule. Who a use case is running for records the whole of it.

Which endpoint a user is served on. Each user carries two switches, one for the MCP endpoint and one for the client endpoint, both on until an administrator turns one off with mfctl user endpoints. A user kept off an endpoint is refused there whichever credential they present — a password, a key, a key pair, an access token, or a client session minted before the switch changed — and the refusal is the one a credential nobody holds receives, so a caller is not told that what they presented is good somewhere else. A grant decides what an admitted caller may do and a switch decides whether the user is admitted on that endpoint at all; neither widens the other, and no permission name turns a switch back on. The switch is read in the same statement that resolves the credential or the session on every request, so a change reaches every replica on that user's next request and nothing needs to be revoked for it to hold. It holds where an endpoint authenticates: an endpoint configured to require no credential names no user from a request, so it has no switch to consult. The administrative endpoint has no switch: what reaches it is a credential listing admin, held by a user whose roles grant an administrative name, and the default administrator holds both mail switches off.

Whether a capability exists. A grant composes with availability rather than replacing it: a tool may be unavailable, unauthorized, or both, and no grant makes a capability this deployment does not have appear. An endpoint whose chat provider is unconfigured withholds ask_mail from a caller granted mailfathom.assistant.use exactly as it does from one granted nothing.