You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: register suggest_query_params in core (#221)
Move the suggest_query_params tool from the Alliance overlay into core
(src/core/server/tools/) and register it in setupCoreServerOnContext, so a
core-initialized server can expose it. The tool only imported from core/server,
so this is a clean move; Alliance still gets it via the core setup it calls, and
its now-duplicate registration is removed.
Deliberately narrow per the issue: no change to the disableSuggestFlow default
(core stays gate-off, guided_query first) or to CORE_SERVER_INSTRUCTIONS, and
Alliance behaviour is unchanged. Adds a core-registration test and updates the
RC-readiness core tool list.
* test: execute suggest_query_params on a core server end-to-end (#221 review)
The cross-entry-point test proves core setup invokes the registrar; add a
callTool round-trip in the RC-readiness harness so a core-initialized server
actually exposes and executes suggest_query_params (asserts status success +
namespace_found). A broken registration can no longer pass by only being listed.
* docs: reflect suggest_query_params as a core tool (#221 review)
suggest_query_params is now registered in core, so update the docs that still
called it Alliance-specific: the setupCoreServer docblock (nine core tools, ten
with multi-source list_sources; tool registered but the suggest-flow gate stays
off by default for core), the CORE_SERVER_INSTRUCTIONS docstring and the
setupAllianceServer docblock, and the Core-vs-Alliance table + gate paragraph in
TOOLS.md. Alliance's Boost/Slack URL generators are clarified as generate_urls
registry entries, not a separate MCP tool. PACKAGE_SPLIT_EVAL.md left as a
point-in-time eval.
* docs(suggest_query_params): qualify the mandatory-call note by gate state
The tool description said the call is mandatory before query/count tools
unconditionally, but core registers the tool with the suggest-flow gate
off by default. Say it's required only when the gate is enabled (Alliance
default) and optional otherwise, matching the gate paragraph in TOOLS.md.
|`setupAllianceServer` / published CLI |**9** (single-key) or **10** (multi-source): core tools plus `suggest_query_params`|`ALLIANCE_SERVER_INSTRUCTIONS` — includes suggest-flow quickstart |
30
+
|`setupCoreServer` (package root) |**9** (single-key) or **10** (multi-source adds `list_sources`): `list_namespaces`, `namespace_router`, `count`, `query`, `keyword_search`, `query_documents`, `generate_urls`, `guided_query`, `suggest_query_params`|`CORE_SERVER_INSTRUCTIONS` — includes `guided_query`; registers`suggest_query_params` but the suggest-flow gate is off by default|
31
+
|`setupAllianceServer` / published CLI |**9** (single-key) or **10** (multi-source): the same core tool surface — Alliance adds built-in Boost/Slack URL generators for `generate_urls` (not an extra MCP tool) and enables the gate by default|`ALLIANCE_SERVER_INSTRUCTIONS` — includes suggest-flow quickstart |
32
32
33
33
## Suggest-flow gate
34
34
35
35
When **`disableSuggestFlow`** is **`false`** (Alliance default via `resolveAllianceConfig` / CLI), tools **`query`**, **`count`**, and **`query_documents`** require a prior successful **`suggest_query_params`** call for the **same namespace string** within the cache TTL (see `PINECONE_CACHE_TTL_SECONDS`). The gate is in-process memory (`requireSuggested`).
36
36
37
-
When **`disableSuggestFlow`** is **`true`** (core default via `resolveConfig`), the gate is bypassed — suitable for `setupCoreServer`embedders that do not register `suggest_query_params`.
37
+
When **`disableSuggestFlow`** is **`true`** (core default via `resolveConfig`), the gate is bypassed: `setupCoreServer` still registers `suggest_query_params`, but embedders can call it optionally rather than being required to before `query` / `count` / `query_documents`.
38
38
39
39
**Namespace consistency:** use the **exact same**`namespace` value (including trimming — avoid leading/trailing spaces in one call and not the other) for `suggest_query_params` and downstream gated tools. Mismatches yield `FLOW_GATE` with a suggestion to call `suggest_query_params` first.
Copy file name to clipboardExpand all lines: src/constants.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ Features:
49
49
Notes:
50
50
- Result rows include both \`document_id\` (canonical) and \`paper_number\` (deprecated alias kept for one minor cycle; will be removed in the next major release). Prefer \`document_id\` in new code.`;
51
51
52
-
/** MCP instructions for {@link setupCoreServer} (eight core tools including guided_query). */
52
+
/** MCP instructions for {@link setupCoreServer} (nine core tools including guided_query and suggest_query_params). */
53
53
exportconstCORE_SERVER_INSTRUCTIONS=`Quickstart for AI clients: for most user questions, call \`guided_query\` with the user's question — it does namespace routing, suggestion, and execution in one shot and returns \`experimental.decision_trace\` you can show the user. Alternatively call \`list_namespaces\` to discover namespaces, optionally \`namespace_router\` to rank candidates from user intent, then \`query\` (preset fast/detailed/full), \`count\`, \`query_documents\`, \`keyword_search\`, or \`generate_urls\` as needed.
@@ -33,7 +33,7 @@ export function registerSuggestQueryParamsTool(server: McpServer, ctx?: ServerCo
33
33
"Suggest which fields to request and whether to use the count tool, based on the namespace schema (from list_namespaces) and the user's natural language query. "+
34
34
'Call list_namespaces first to get available namespaces and metadata fields. Then call this tool with the target namespace and the user query; '+
35
35
'it returns suggested_fields (only fields that exist in that namespace), use_count_tool (true if the query is a count question), recommended_tool (count | fast | detailed | full — same vocabulary as the query tool preset), and an explanation. '+
36
-
'This step is mandatory before query/count tools; use the returned suggested_fields in query tools to reduce payload and cost.',
36
+
'When the suggest-flow gate is enabled (the Alliance default) this call is required before the query/count tools; when the gate is off (the core default) it is optional. Either way, use the returned suggested_fields in query tools to reduce payload and cost.',
0 commit comments