Files
computer-playbook/roles/web-app-nextcloud/files/mcp/tools.json
kevinveenbirkenbachandClaude Opus 5 70feb319be feat(nextcloud): front the Context Agent with the MCP adapter
The hub serves 94 tools across 23 categories, write tools included, and enabling the ExApp switches every category on. That surface was published on the public vhost and every discovered client was handed an app password for it. svc-ai-mcp-adapter now sits in front in mcp_passthrough mode: clients present credentials.mcp_bearer to contextagentmcp and reach the nine read tools of calendar, contacts and files, which files/mcp/tools.json names and the sidecar enforces per call. Those three categories are the ones whose upstream is_available is unconditional, so the served set does not vary with which optional apps a deployment installs.

Enforcing it in the sidecar rather than in each client is what makes it hold: web-app-openwebui renders no per-tool filter at all, so a client-side include list would have bounded two consumers out of three.

06c13e7f3e withdrew the declared path from the edge for exactly this reason - "that surface is what the adapter exists to narrow". Nextcloud answers the same route under a second spelling, without the /index.php front controller, which try_files rewrites back onto the route after the edge has already declined to block it. The withdrawal becomes a regex covering both, and only where stripping the front controller changes the path, so the four adapter providers without one render unchanged.

The app password is minted after the stack renders, so it reaches the sidecar through upstream.env and rebuild.yml rather than the compose environment: compose up resolves env_file while creating the container, a restart does not. The sidecar is the last service in the template because a Jinja set has no block scope and its env_file would otherwise displace the one talk, whiteboard and talk_recording each carry.

Two suites cover what nothing measured: the vhost template rendered without a container, asserting both spellings are withdrawn, and every shipped tools.json loaded through the adapter own loader, so a bad contract fails in a second instead of as a probe timing out an hour into a deploy. The guest spec probed mcp.endpoint.path, which this change makes the proxy answer 404 for its own reasons; it now probes all three public paths and requires no MCP body.

Not yet deployed: the sidecar build, the upstream.env delivery and the hub answering exactly nine tools are unverified against a running stack.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-03 20:55:05 +02:00

147 lines
3.8 KiB
JSON

{
"find_details_of_current_user": {
"description": "Find the current user's personal information.",
"input_schema": {
"properties": {},
"type": "object"
},
"mutating": false
},
"find_free_time_slot_in_calendar": {
"description": "Find a time slot in which every participant is free.",
"input_schema": {
"properties": {
"end_time": {
"description": "End of the range to search, as YYYY-MM-DD. Defaults to seven days after start_time.",
"type": "string"
},
"participants": {
"description": "Email addresses of the participants to find a common slot for.",
"items": {
"type": "string"
},
"type": "array"
},
"slot_duration": {
"description": "Length of the slot in hours. Defaults to one hour.",
"type": "number"
},
"start_time": {
"description": "Start of the range to search, as YYYY-MM-DD. Defaults to now.",
"type": "string"
}
},
"required": [
"participants"
],
"type": "object"
},
"mutating": false
},
"find_person_in_contacts": {
"description": "Find a person's contact details by name, returning email, phone and address.",
"input_schema": {
"properties": {
"name": {
"description": "The name to search the address book for.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"mutating": false
},
"find_person_in_users": {
"description": "Search the instance's users and return their user IDs.",
"input_schema": {
"properties": {
"search_term": {
"description": "The term to find the user by.",
"type": "string"
}
},
"required": [
"search_term"
],
"type": "object"
},
"mutating": false
},
"get_file_content": {
"description": "Return the content of one file.",
"input_schema": {
"properties": {
"file_path": {
"description": "Path of the file inside the user's Files.",
"type": "string"
}
},
"required": [
"file_path"
],
"type": "object"
},
"mutating": false
},
"get_file_content_by_file_link": {
"description": "Return the content of one file addressed by an internal Nextcloud link.",
"input_schema": {
"properties": {
"file_url": {
"description": "Internal file URL, for example https://host/index.php/f/12345.",
"type": "string"
}
},
"required": [
"file_url"
],
"type": "object"
},
"mutating": false
},
"get_folder_tree": {
"description": "List the files the user holds in Nextcloud Files as a folder tree.",
"input_schema": {
"properties": {
"depth": {
"description": "Depth of the returned tree.",
"type": "integer"
}
},
"required": [
"depth"
],
"type": "object"
},
"mutating": false
},
"list_calendars": {
"description": "List every existing calendar by name.",
"input_schema": {
"properties": {},
"type": "object"
},
"mutating": false
},
"list_tasks": {
"description": "List tasks from the calendars, optionally narrowed by calendar and status.",
"input_schema": {
"properties": {
"calendar_name": {
"description": "Name of the calendar to list from, as returned by list_calendars. Omit to list from all.",
"type": "string"
},
"filter_status": {
"description": "One of NEEDS-ACTION, COMPLETED, IN-PROCESS or CANCELLED.",
"type": "string"
}
},
"type": "object"
},
"mutating": false
}
}