Skip to content

MCP Expansion Design

Ed Mozley edited this page Dec 6, 2026 · 5 revisions

MCP expansion - design

Status: AGREED Β· 6 December 2026 Β· every question answered by Ed the same day (below)

Wave 1 BUILT (6 December 2026, ships in 6.1.0): all ten tools above, System β†’ AI tools (user page), the Projects assistant reading through the shared project reads. One deviation: the Warbot counts only variants were not built - every Wave 1 tool is one-to-one, so Warbot has none of them yet (a later wave can add room-safe counts). The choices on System β†’ AI tools are one JSON row of differences rather than a row per change - same behaviour, no new table.

For developers, and for deciding the order. Read How AI fits together first; the numbers come from the generated AI tools dictionary.

The request

Ed, 6 December 2026: "a massive expansion of what the MCP layer can do" - after checking it would not become a muddle.

Where we are (6.0.2)

  • 23 shared tools (MCP and Talk), 18 for Warbot, plus the Projects assistant's own 19 (6 read, 13 propose) and the CMDB assistant's own 11.
  • 17 of 27 modules have no tool at all: Calendar, Checklists, Domains, Files, Forms, LMS, Network Mapper, People, Process Mapper, Reporting, Software, Starters, Tasks, War Room (Warbot only), Watchtower, Wiki, Workflow.
  • The 23 tools write their own queries. They use the shared permission helpers (company, departments, Knowledge visibility, members-only projects), so they are safe - but each answer is worked out separately from the screen that shows the same thing.
  • The service layer (includes/services/, 72 files) is strong at changing records and thin at reading them: Tickets has loadTicket() only, Tasks has no list function, Projects has loadRow() / loadForActor(). A few already have the shape this design wants - SoftwareSeatsService::forPerson(), ConsumablesService::listItems(), ServiceUptimeService::summaryFor().

The shape

MCP clients        Talk        Warbot        Screens        REST API
     β”‚               β”‚            β”‚             β”‚              β”‚
 MCP layer: key permissions, outsider-text defences, limits, audit
     β”‚               β”‚            β”‚             β”‚              β”‚
     └───────────────┴─── service layer (read + write functions,
                          permissions by who is asking) β”€β”€β”€β”€β”€β”€β”€β”˜
                                       β”‚
                                   database

The rules

  1. A tool is a question, not an endpoint. "What is in my queue", "who starts on Monday", "who uses Visio and how many licences are left" - not one tool per REST route. An AI chooses well among a few clear, well-described tools and badly among hundreds of thin ones. One tool may call several service functions.
  2. Read functions live in the module's service. For each module in the expansion, the reading it needs is added to its service first - TasksService::dueFor(), PeopleService::summaryFor() - taking who is asking and doing the scoping inside (company, departments, members-only, the module's own rules). The screen, the REST API, MCP, Talk and Warbot then all use the same function: one answer, one fix.
  3. The MCP layer adds only what an outside AI needs and never puts it in the services: the API key's permissions (mcpToolAllowed()), the defences for text written by outsiders (includes/ai_untrusted.php), the hourly limit on reading ticket text, and the record of every call.
  4. One tool, every door. A tool in mcpTools() reaches MCP and Talk at once. Warbot gets it only if its answer is safe for a whole channel (counts and states, never a person's details or a ticket's text) - listed in mcpWarbotToolMap().
  5. The assistants move onto the shelf. The Projects and CMDB assistants' read tools are replaced by shared ones (the same questions, answered once). Their propose tools stay theirs: a change is a screen's job, applied by a person.
  6. No tool changes anything in this design. Letting MCP change records is a separate decision with its own design page (a per-key switch, a confirm step, the audit) - after this one.

Who decides what (agreed with Ed, 6 December 2026)

Responsibility Where it belongs
Can this person see this task? Service layer
Which departments' and companies' records can they access - including an API key limited to some companies? Service layer: the key narrows the reader, never widens it
Can this API key use the my_tasks tool? MCP layer (mcpToolAllowed())
Has this key used up its reading allowance? MCP layer
Is this tool safe in a shared War Room? Warbot exposure policy (mcpWarbotToolMap())
May this confidential ticket go to an AI? Is this text written by an outsider? AI policy, shared by MCP, Talk and Warbot (ticketAiAllowed(), includes/ai_untrusted.php)

Why the key's company limit is in the service: it decides which records, which is the service's job, and the REST API needs the same rule - left in the MCP layer it would need a second copy. The same "narrow, never widen" rule searchScopeForAnalyst() has had since 6.0.2.

Reads move to the service; tools are added on purpose

Moving a read into a service makes it available to the doors, not exposed. For each module in a wave: (1) its reads move into the service and its screen uses them; (2) the chosen tools are added on top - each a deliberate few lines (name, the description the AI reads, inputs, sensitive, Warbot-safe). A settings page or an admin list getting tidier never hands anything new to an AI. (Ed asked, 6 December 2026.)

The existing 23 tools

Nothing is thrown away. A tool's name, the description the AI reads and its inputs stay exactly as they are; only the few lines that fetch the data change, to call the service, as each module's read functions arrive. MCP clients and Talk notice nothing.

Proposed tools, in waves

Names are working titles; each becomes a service read function plus a tool. Warbot = also safe for a channel.

Wave 1 - questions people ask every day

Module Tools Answers Warbot
Tasks my_tasks, tasks_due, task_summary what is on my plate, what is due or overdue this week (mine or my team's), one task with its subtasks and history counts only
People person_summary who someone is - company, department, manager - and what they have: open tickets, assets, licences, access services -
Software licence_status, who_uses seats used and free, renewals due; who has an application or a licence counts only
Starters & leavers starters_upcoming, case_status who starts or leaves in the next N days and how ready each case is; one case's open steps counts only
Forms / requests requests_waiting, request_status requests waiting for my approval (alongside my_approvals for changes); where one request has got to -

Wave 1 also: System β†’ AI β†’ Tools (decided with Ed, 6 December 2026)

Which tools may send their answers to an outside AI. Talk and Warbot pass every answer through the AI provider an administrator set up (OpenAI, Anthropic, ...); a team may be happy for ticket counts to go there but not people's phone numbers. Talk never shows anything the person could not see on screen - this is about what leaves the install, not what the person may see.

  • One screen, System β†’ AI β†’ Tools: every tool, grouped by module, read from the same registry as the AI tools dictionary - a tool added in a release appears on it by itself.
  • A column per door that uses the install's own AI provider: Talk and Warbot. MCP is not on it: an MCP key's client brings its own AI, and different keys go to different clients, so MCP's ticks stay on each API key, where its permission ticks already are.
  • Defaults: a tool is ticked unless it is marked sensitive - people's details, ticket text - which starts unticked. A tool added by a later release follows the same rule, so nothing new reaches a provider that would surprise anyone.
  • Warbot can only tick tools that are safe for a channel (mcpWarbotToolMap()); the rest show as unavailable, with the reason.
  • Build: each tool definition gains 'sensitive' => true|false; the choices are stored as rows (tool, door, allowed - one row per change from the default), read where each door builds the list the AI is offered - Talk through mcpToolsFor() with its person context (chained) and talkLiveTools() (live voice), Warbot through warbotToolsFor(). Administrators only, recorded in the audit like other AI settings.

Wave 2 - deepen what is thin

Module Tools Answers
Changes change_summary, upcoming_changes one change in full; what is scheduled in the next N days and any freeze
Assets asset_summary, warranty_expiring one asset in full (holder, software, CI links); warranties and leases ending soon
Problems problem_summary one problem: workaround, linked tickets, status
Contracts renewals_due contracts ending or renewing in the next N days
Knowledge reviews_due articles overdue for review, mine or all
Calendar whats_on events and leave today or this week
Checklists checklist_progress a ticket's or task's checklist: done and outstanding steps
Morning checks, Service status morning_check_history, status_history trends over a period, not just today

Wave 3 - the rest

Module Tools Answers
Domains expiring_soon domains and certificates about to expire
Watchtower alerts_now what is red or amber now
Workflow workflow_failures workflows that failed recently, and why
Reporting report_packs which packs exist and when they last ran (not their content)
LMS training_due training due or overdue, mine or my team's
Files, Wiki find_file, search_wiki find a file or a page by name or words
Network / Process Mapper find_diagram which diagrams show a device or a process
War Room - stays out of MCP on purpose (its search covers private messages - see mcpWarbotToolMap())

How each tool is built

  1. Service read function, taking the reader (ActorContext or analyst id), scoping inside, returning plain rows. Used by the screen too where the screen shows the same thing - so the screen and the tool cannot disagree.
  2. Tool in mcpTools(): name, the description the model reads, JSON schema, module, company_safe, capability, handler calling the service.
  3. Tests: what it should return, and a denial for each rule with a positive control - another company, a department the analyst is not in, no module access, a members-only record.
  4. Dictionary regenerated (php scripts/gen_ai_tools_dictionary.php) - it should show the gap closing.
  5. Write-up: the module's developer guide gets its read functions; the MCP user page gets the tools.

Not included

  • Tools that change records (a later design).
  • The self-service portal as a door (portal users have no MCP keys).
  • MCP resources and prompts - tools first; revisit if a client makes good use of them.

Questions for Ed

  1. The order of Wave 1. Decided 6 December 2026: Tasks, People, Software, Starters, then Forms (Ed: "the order is fine").
  2. People details. Decided 6 December 2026: (b) - a separate tick on the API key, Read people's details, off by default, like the ticket-text ticks; person_summary is marked sensitive, so it also starts unticked on System β†’ AI β†’ Tools.
  3. Talk. Should every new tool reach Talk automatically? Decided 6 December 2026: a per-tool tick list instead - System β†’ AI β†’ Tools, above (Ed: "a screen where all the tools are listed and you tick the ones you are comfortable with").
  4. The assistants. Decided 6 December 2026: move them - the Projects assistant onto shared tools in Wave 1, the CMDB assistant in Wave 2. Their propose tools stay theirs.

FreeITSM

Getting Started

Modules

Multi-tenancy (planned)

Responses to feedback

Blue sky thinking

Bugs resolved

Pull requests

Links

Clone this wiki locally