Skip to content

Commit 599c2fc

Browse files
committed
Refactor: Refine Query Tool Documentation in openapi.yaml #7672
1 parent 634048b commit 599c2fc

1 file changed

Lines changed: 34 additions & 32 deletions

File tree

ai/mcp/server/knowledge-base/openapi.yaml

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -256,40 +256,42 @@ paths:
256256
- `guide` and `src`: Current best practices and implementation
257257
- `blog`: Historical context (code examples may be outdated)
258258
- `example`: Concrete usage patterns
259-
- `ticket`: Historical decisions and problem-solving context
259+
- `ticket`: Can be historical context (**closed tickets**) or potential work items (**open tickets**). Distinguish between them carefully.
260260
261261
## Query Strategies
262-
263-
### Strategy 1: Broad to Narrow (Discovery Pattern)
264-
When learning about a new concept:
265-
1. Start broad: `"benefits"`, `"architecture"`, `"fundamentals"`
266-
2. Read results from `learn/benefits/` or top-level `.md` files.
267-
3. Narrow down: `"Button component examples"`, `"afterSet hook"`
268-
4. Find patterns: `"form validation patterns"`, `"store implementation"`
269-
270-
### Strategy 2: High-Level Conceptual Questions
271-
For architectural or "big picture" questions:
272-
1. Check `learn/tree.json` for content structure.
273-
2. Use top-level categories: "Benefits", "Fundamentals".
274-
3. Query using those concepts first.
275-
4. Drill down into specific implementations.
276-
277-
### Strategy 3: Targeted Content-Type Searching
278-
Use the `type` parameter to focus results:
279-
- Conceptual understanding: `type='guide'`
280-
- Usage examples: `type='example'`
281-
- Implementation details: `type='src'`
282-
- Historical context: `type='ticket'` or `type='blog'`
283-
284-
**Pro tip**: If a broad query returns too many source files and not enough guides, re-run with `type='guide'`. If you need implementation after reading guides, re-run with `type='src'`.
285-
262+
263+
### The Discovery Pattern: Broad to Narrow
264+
When learning about a new concept or feature area:
265+
266+
1. **Start Broad:** Query foundational concepts first.
267+
- For high-level questions, consult `learn/tree.json` to identify key concepts.
268+
- Use terms like `"benefits"`, `"architecture"`, `"fundamentals"`.
269+
- Prioritize reading guides from top-level directories.
270+
271+
2. **Narrow to Specifics:** Use broad results to formulate targeted queries.
272+
- `query_documents(query='Button component examples')`
273+
- `query_documents(query='what is Neo.component.Base?')`
274+
275+
3. **Filter by Type:** Use the `type` parameter for focused results.
276+
- Conceptual: `type='guide'`
277+
- Usage examples: `type='example'`
278+
- Implementation: `type='src'`
279+
- Historical context: `type='ticket'` or `type='blog'`
280+
286281
## When Queries Return No Results
287-
288-
If systematic querying still yields no relevant information, **STOP and document the gap**:
289-
1. Clearly describe what you were trying to accomplish.
290-
2. List the queries you attempted.
291-
3. Explain why existing results were insufficient.
292-
4. Suggest what type of documentation would help (e.g., a guide, an example, or an architectural explanation).
282+
283+
If queries consistently return no relevant results for your task:
284+
285+
**Pause and document the gap:**
286+
- Clearly describe what you were trying to accomplish
287+
- List the queries you attempted (show your work)
288+
- Explain why existing results were insufficient
289+
- Consult with the user about next steps
290+
291+
**Before implementing based on assumptions:**
292+
- Explain the knowledge gap you've identified
293+
- Propose your approach and its basis (general software patterns, analogous Neo.mjs patterns, etc.)
294+
- Get explicit user approval to proceed
293295
294296
## Handling Failures
295297
@@ -541,7 +543,7 @@ components:
541543
- `src`: Source code implementation
542544
- `example`: Working examples and demos
543545
- `blog`: Historical context and evolution (code may be outdated)
544-
- `ticket`: Past issues, decisions, and problem-solving
546+
- `ticket`: Issues from GitHub. Can be open (potential work) or closed (historical context).
545547
- `release`: Release notes and changelogs
546548
enum: [all, blog, guide, src, example, ticket, release]
547549
default: all

0 commit comments

Comments
 (0)