Frontmatter
| title | refactor(memory-core): shrink manage_database MCP tool description (#10506) |
| author | neo-gemini-pro |
| state | Merged |
| createdAt | Apr 29, 2026, 6:40 PM |
| updatedAt | Apr 30, 2026, 10:32 AM |
| closedAt | Apr 30, 2026, 10:32 AM |
| mergedAt | Apr 30, 2026, 10:32 AM |
| branches | dev ← gemini/10506-shrink-managedatabase-description |
| url | https://github.com/neomjs/neo/pull/10507 |

Input from GPT-5.5 (Codex Desktop):
● # PR Review Summary
Status: Approved
Peer-Review Opening: Reviewed PR #10507 against the MCP tool-description budget and the specific
x-pass-as-objectdispatch concern raised by @tobiu.
Context & Graph Linking
- Target Issue ID: Closes #10506
- Related Graph Nodes:
memory-core,manage_database,mcp-tool-description-budget,x-pass-as-object
Test-Execution Audit
- Checked out PR #10507 locally via
checkout_pull_request.- Ran targeted unit coverage:
npm run test-unit -- test/playwright/unit/ai/mcp/server/memory-core/McpServerToolLimits.spec.mjs→ 1 passed (688ms).- Ran an explicit dispatch-shape probe using
ToolService.callTool('manage_database', {action: 'stop'})with a stub handler → received a single object argument{action: 'stop'}.
Depth Floor
Challenge / edge case checked: The main risk was that adding
x-pass-as-object: trueonly in OpenAPI could break dispatch if the Memory Core handler still expected positional arguments. I checked the full path:Server.mjspasses MCPargumentsunchanged intocallTool(name, args), genericai/mcp/ToolService.mjsbranches onoperation['x-pass-as-object'] === true, andChromaLifecycleService.manageDatabase(args)already expects a single object. No compatibility gap found.Rhetorical-Drift Audit: Pass. The PR body claims a tool-description budget reduction and
x-pass-as-objectaddition; the diff substantiates both. I measured themanage_databasedescription shrinking from 1161 to 726 chars and 177 to 104 words.
Graph Ingestion Notes
[KB_GAP]: None.[TOOLING_GAP]: None. The targeted unit test and dispatch-shape probe both passed.[RETROSPECTIVE]: This is a good example of treating OpenAPI text as runtime payload rather than source documentation. The remaining multi-line description is still under the 1024-char limit and preserves the lifecycle nuance agents need to avoid stopping externally managed ChromaDB processes.
Provenance Audit
N/A. This is not a new architectural abstraction; it applies an already documented MCP-description budget rule to one existing tool.
Close-Target Audit
- Close-target identified:
Closes #10506- Fetched issue #10506 live; labels are empty, so it is not
epic-labeled.Findings: Pass. The close-target syntax is newline-isolated and valid.
MCP-Tool-Description Budget Audit
- Modified OpenAPI description inspected.
- Description remains below the 1024-char hard cap: 726 chars.
- No internal ticket/session references inside the runtime description payload.
- No excess architectural narrative; remaining text describes start/stop behavior and when to use the tool.
Findings: Pass. Although the description remains folded multi-line, the content is justified by the managed-vs-external database lifecycle nuance and is materially smaller than the prior payload.
Wire-Format Compatibility Audit
x-pass-as-objectchanges the handler call shape for this operation.- Generic
ToolServicesupport exists and was exercised empirically.- The Memory Core service handler already accepts the object shape.
Findings: Pass.
Cross-Skill Integration Audit
N/A. This PR does not introduce a new workflow convention; it applies an existing budget audit standard.
Required Actions
No required actions — eligible for human merge.
Evaluation Metrics
[ARCH_ALIGNMENT]: 95 - 5 points deducted only because the description remains multi-line rather than the ideal terse single-line payload; the retained detail is justified by lifecycle semantics.[CONTENT_COMPLETENESS]: 95 - 5 points deducted because the PR body is concise rather than a full Fat Ticket, but it contains the relevant issue, session provenance, and mechanical intent.[EXECUTION_QUALITY]: 95 - 5 points deducted because the PR does not add a dedicated regression test for themanage_databasepass-as-object shape; external review empirically verified the path.[PRODUCTIVITY]: 100 - I actively checked both acceptance criteria: the description is significantly shorter andx-pass-as-object: trueis present and functional.[IMPACT]: 35 - Localized runtime-payload reduction on one MCP tool; useful but not a broad subsystem shift.[COMPLEXITY]: 20 - Low complexity: one OpenAPI operation changes, with existing generic dispatch support already in place.[EFFORT_PROFILE]: Quick Win - Low-risk, measurable token-budget improvement with a small diff and clear validation path.
Closes #10506
This PR applies the MCP-Tool-Description Budget Audit standard to the
manage_databasetool in the Memory Core. By condensing the verbose behavioral conditionals into shorter sentences and addingx-pass-as-object: true, we free up reasoning tokens in the agent's context window.Agent: @neo-gemini-pro Origin Session ID: df8049d8-56ad-417b-ae0e-17a38e22a0ae