Skip to content

Commit 55f51f9

Browse files
drknowhowclaude
andcommitted
docs(oracle): enrich MCP + OpenAPI discovery guidance for LLM clients
MCP server instructions and the OpenAPI info.description now describe the recommended workflow, project_path requirement, capability tiers, Bearer auth, and invocation, so Claude (MCP) and generic function-calling LLMs (REST) orient the same way. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1bf0bfc commit 55f51f9

3 files changed

Lines changed: 38 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- Discovery API guidance enriched for LLM clients: the MCP server `instructions` and the
12+
OpenAPI `info.description` now spell out the recommended workflow (`list_projects`
13+
cross-project search → `c3_compress`/`c3_read`), the `project_path` requirement, the
14+
read/safe-action capability tiers, Bearer auth, and how to invoke tools — so Claude (MCP)
15+
and generic function-calling LLMs (REST) orient the same way.
16+
917
### Fixed
1018

1119
- **Ghost files (0-byte) from shell-redirect misinterpretation.** The output filter

oracle/mcp_oracle.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,19 @@
2323
logger = logging.getLogger("oracle.mcp")
2424

2525
_INSTRUCTIONS = (
26-
"C3 Oracle Discovery — cross-project code & memory intelligence as tools. "
27-
"Start with list_projects to see available projects, then use c3_search_cross "
28-
"or search_facts to discover across all of them, or the per-project tools "
29-
"(c3_search, c3_read, c3_compress, query_memory, read_graph) with a project_path. "
30-
"suggest_action creates a PENDING suggestion for human approval; delegate_task runs "
31-
"a configured Oracle agent. No code-editing tools are exposed."
26+
"C3 Oracle Discovery — use C3's cross-project code & memory intelligence as tools.\n"
27+
"\n"
28+
"Recommended workflow:\n"
29+
"1. list_projects — see which C3 projects exist (names + absolute paths).\n"
30+
"2. Discover across ALL projects: search_facts (memory) or c3_search_cross (code).\n"
31+
"3. Narrow to one project using its path: c3_search to find code; c3_compress "
32+
"(mode='map') to see a file's shape before reading; c3_read for exact content; "
33+
"query_memory / read_graph / cross_insights for that project's memory.\n"
34+
"\n"
35+
"Notes: per-project tools REQUIRE a `project_path` taken from list_projects. Every tool "
36+
"returns JSON. suggest_action creates a PENDING suggestion for a human to approve (not a "
37+
"direct write); delegate_task runs a configured Oracle agent. Read + safe-action tiers "
38+
"only — no code-editing tools are exposed."
3239
)
3340

3441

oracle/services/tool_registry.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,23 @@ def openapi_spec(self, server_url: str = "") -> dict:
398398
"info": {
399399
"title": "C3 Oracle Discovery API",
400400
"version": _c3_version(),
401-
"description": "Read + safe-action discovery tools over C3's cross-project code and "
402-
"memory intelligence, for use by external LLMs.",
401+
"description": (
402+
"Use C3's cross-project code & memory intelligence as tools, for external LLMs.\n\n"
403+
"**Workflow:** call `list_projects` first to get project names + absolute paths; "
404+
"discover across all projects with `search_facts` (memory) or `c3_search_cross` "
405+
"(code); then narrow to one project (pass its `project_path`) using `c3_search`, "
406+
"`c3_compress` (mode `map` to see a file's shape before reading), `c3_read` (exact "
407+
"content), `query_memory`, `read_graph`, or `cross_insights`.\n\n"
408+
"**Auth:** every request requires an `Authorization: Bearer <token>` header "
409+
"(get it from `/api/discovery/mcp-info` or by running `c3 oracle api info`).\n\n"
410+
"**Capability tiers:** `read` tools are pure discovery; `action` tools are safe and "
411+
"non-destructive — `suggest_action` creates a PENDING suggestion for human approval "
412+
"(not a direct write) and `delegate_task` runs a configured Oracle agent. No "
413+
"code-editing tools are exposed.\n\n"
414+
"**Invoke:** POST the arguments object to `/api/discovery/tools/{name}`, or POST "
415+
"`{\"tool\": \"<name>\", \"args\": {...}}` to `/api/discovery/call`. Per-project "
416+
"tools require a `project_path` from `list_projects`."
417+
),
403418
},
404419
"security": [{"bearerAuth": []}],
405420
"components": {

0 commit comments

Comments
 (0)