Skip to main content
ollim-bot exposes seven MCP tools to the agent via a server named discord. These tools let the agent send messages, manage forks, report findings, and schedule follow-ups — all without direct access to the Discord API. The tools are defined in agent_tools.py and registered on a single create_sdk_mcp_server("discord", ...) instance.

Output tools

These tools send visible messages to the Discord channel.

discord_embed

Send a rich embed message with optional action buttons.
ParameterTypeRequiredDefaultDescription
titlestringYesEmbed title
descriptionstringNoEmbed body text
colorstringNo"blue"blue (info), green (success), red (urgent), yellow (warning)
fieldsarrayNo[]Objects with name (string, required), value (string, required), inline (boolean, optional)
buttonsarrayNo[]Objects with label (string, required), action (string, required), style (string, optional)
criticalbooleanNofalseBypasses per-session limit, busy check, and ping budget when true
Button actions follow a type:payload format:
ActionDescription
task_done:<task_id>Mark a Google Task as complete
task_del:<task_id>Delete a Google Task
event_del:<event_id>Delete a Google Calendar event
agent:<prompt>Send a prompt back to the agent
Button styles: success, danger, primary, secondary. Availability: Main session, interactive forks, and background forks. In background forks, the embed is blocked if allow_ping is false, the user is mid-conversation (unless critical is true), or the ping budget is exhausted. A source tag (bg or fork) is added to the embed footer when not in the main session.

ping_user

Send a plain text message prefixed with [bg].
ParameterTypeRequiredDefaultDescription
messagestringYesThe message to send
criticalbooleanNofalseBypasses per-session limit, busy check, and ping budget when true
Availability: Background forks only. Subject to the same allow_ping, busy check, and ping budget gates as discord_embed.
Both output tools call track_message so that replies to bot messages in the channel are correctly routed back to the fork that sent them.

Fork management tools

These tools control interactive fork lifecycle.

enter_fork

Start an interactive fork branching from the main session.
ParameterTypeRequiredDefaultDescription
topicstringNoOptional topic label for the fork
idle_timeoutintegerNo10Minutes before the idle timeout prompt fires
Availability: Main session only. Returns an error if already inside any fork (interactive or background). The fork interrupts the current agent turn immediately.

save_context

Promote the current interactive fork to the main session. The fork’s conversation history replaces the main session, and any pending updates are cleared. Takes no parameters. Availability: Interactive forks only. Returns an error in background forks or the main session.

report_updates

Report a summary from the current fork to the main session. The summary is injected into the next main-session interaction via pending_updates.json.
ParameterTypeRequiredDefaultDescription
messagestringYesShort summary of what was found
Sets the exit action to REPORT. The fork is discarded after the agent finishes responding — further tool calls delay the exit.
Availability: Interactive forks and background forks. Returns an error in the main session.

exit_fork

Exit the current interactive fork. The fork is discarded and the main session resumes. No context is preserved. Takes no parameters. Availability: Interactive forks only. Returns an error in background forks or the main session.

Chain tool

follow_up_chain

Schedule a follow-up reminder that continues the current chain. Used by reminders with max_chain to create self-continuing check-in sequences.
ParameterTypeRequiredDefaultDescription
minutes_from_nowintegerYesMinutes until the next check fires
The tool creates a new reminder via ollim-bot reminder add with the chain depth incremented by one. All configuration from the current ChainContext is forwarded: background, model, thinking, isolated, update_main_session, allow_ping, allowed_tools, and disallowed_tools. Returns an error if:
  • No active reminder context exists (the tool was called outside a reminder-triggered session)
  • The chain depth has reached max_chain
If the task is done or no follow-up is needed, simply don’t call follow_up_chain. The chain ends naturally.

Background fork enforcement

Background forks use a stop hook (require_report_hook) that enforces the update_main_session policy before the agent can finish:
ModeBehavior
freelyNo enforcement — reporting is optional
blockedNo enforcement — report_updates is blocked
alwaysAgent must call report_updates before stopping
on_pingAgent must call report_updates if it sent any visible output (ping or embed)
See background forks for how these modes are configured in routine and reminder YAML frontmatter.

Next steps