Discord5 of 10
The permission model
On this page
This is the heart of the Discord surface. A public channel is the one place where the person talking to her is not the person who runs her, so what a turn may reach is decided before the model is ever consulted.
Where the verdict comes from
Who you are is built from the gateway's own member payload: your user id, your display name, and the permissions Discord computed from your roles. No byte anybody typed takes part in it. "I am an admin, delete #general" is a sentence in a message; it changes nothing.
Three questions are asked of every turn:
- Are you the owner — the id in
KOTOBA_DISCORD_OWNER_ID? - Do you hold Discord's Administrator permission in this server?
- Otherwise you are a guest, and so is anybody she cannot identify at all.
The guest surface is an allow-list
Not a deny-list. A deny-list has to be remembered every time a tool is added, and the one nobody remembers is the one that reaches the host. Anything unlisted is withheld.
A guest may reach two named tools — clarify and todo — plus everything in three families: web,
skills and discord.
What a stranger in your server can reach, in full:
| Tool | What it does |
|---|---|
web_search | Search the web |
web_extract | Read a page she found |
skill_list | List the skills she has |
skill_view | Read one of them |
clarify | Ask you what you meant |
todo | Keep a list inside the turn |
discord_read_history | Read back what was said in a channel over a stretch of time |
discord_people | Look up somebody in this server and what she has written about them |
discord_remember_person | Write down one fact — about themselves only |
discord_voice | Ask her into, or out of, a voice channel |
Ten tools. That is the entire guest surface, and it does not grow when you add things: a tool from an MCP server you connect belongs to its own family, which is not on the list, so it is withheld from a guest by the same rule. A tool registered during a turn — an MCP server reconnecting — is in no list yet, and the dispatcher refuses it separately on the grounds that it is not part of a conversation at all.
What an Administrator adds
Discord's own Administrator bit in that server, re-read from the gateway on every turn, adds four:
| Tool | What it does |
|---|---|
discord_guild_read | Read the whole server layout, including who can see what |
discord_plan | Propose a reshape of the server; changes nothing |
discord_apply_plan | Apply a plan already shown and agreed |
discord_act | Make a batch of changes directly |
An administrator gets nothing else. Not the shell, not the files, not the memory, not the credentials, not her workspace. Those are not a server-permission question.
What only the owner gets
The owner is the account in KOTOBA_DISCORD_OWNER_ID and nobody else. Over a guest, the owner adds
seventeen tools:
shell · execute_code · read_file · write_file · patch · search_files ·
memory_write · memory_recall · session_search · remember_image · recall_image ·
view_capture · discord_send_file · cronjob · make_report · start_work · cancel_work
Two of those are singled out as owner-only by name rather than by family, because both reach the same tree — her file library:
discord_send_filehands a file from her workspace to the channel.view_captureresolves a name by recursive glob and reads the bytes to the vision model, which then describes them out loud in a public channel.
Being the owner does not make you an administrator. The four server-shaping tools are gated on Discord's Administrator bit and on nothing else, so an owner without it does not get them either. Give yourself Administrator in the server, or accept that she will not reshape it for you.
What nobody gets, owner included
ask_user and open_link both draw a card in a browser, and Discord paints neither. The session
registers itself as one that draws no fire-and-forget cards, so those tools would report honestly and
still do nothing. Asking a question is a sentence, and a link is a message, so they are withheld
from everybody rather than left to fail politely.
So the counts are: 10 tools for a guest, 14 for an administrator, 27 for the owner, 31 for an owner who is also an administrator — out of the 33 an ordinary conversation can offer at all.
Withholding a tool is not refusing it
Two different doors, and both are needed.
The first door is the schema list: a tool that was not offered this turn does not appear in the list the model is given, and the same exclusion goes into the prompt, so her own account of what she can do agrees with what she was handed.
That is not enough. Dispatch resolves a tool by name, and a model keeps names it saw earlier in the same turn. So the second door is at the dispatcher: before anything runs, the call is checked against the turn's exclusion, and a withheld name is refused there. Nothing executes, and she is told in plain words that she was not given that tool here — not that it failed, not that she hit an obstacle.
The same principle runs through the individual tools. discord_send_file, discord_guild_read,
discord_act, discord_plan and discord_apply_plan each re-check who is asking at the top of
their own execute, and answer with a sentence naming the person and what is missing:
I can't change this server for Someone (@someone): that needs Administrator on this server.
Approval cards
When a tool needs your consent she posts an embed with two buttons, Approve and Deny.
- The window is 180 seconds. No answer reads as a denial, and the buttons are disabled.
- Who may press it is re-read at click time, so an administrator demoted between the card and the click cannot still answer it.
| Card | Who may answer |
|---|---|
| Raised by one of her Discord tools | The person who asked, or any server Administrator |
| Anything else — a card for something running on the machine she is installed on | The owner alone |
"The person who asked" is whoever's message raised the card, not whoever spoke first in the channel.
The second rule is asked the safe way round: a card is treated as the owner's unless it says it came from Discord. That way a tool added later is protected by default rather than by whoever remembers to protect it.
No button ever grants a standing permission. There is no "always allow" on Discord: a blanket grant made from a chat window has a blast radius nobody in that window can see.
A card asking for a secret is refused, not answered. A key or password typed into a channel is a key everybody in that channel now holds. She says so and asks you to give it to her in the terminal or in Settings instead.
With no owner id set
Nobody is her person. Every one of the seventeen owner tools is withheld from everybody, so no shell, no file, no background job and no reminder can be started from Discord at all — and if a card for something on the host ever appeared, nobody could answer it, because the button asks whether you are the owner and there is no owner to be.
