Skip to content

realign available MCP functions - #29

Open
Lei Jiang (lionelc) wants to merge 1 commit into
Azure:mainfrom
lionelc:debug-skills
Open

Lei Jiang (lionelc) wants to merge 1 commit into
Azure:mainfrom
lionelc:debug-skills

Conversation

@lionelc

@lionelc Lei Jiang (lionelc) commented Jun 11, 2026 •

Copy link
Copy Markdown
Collaborator

This PR re-maps the MCP functions used in agent-kit and only picks those really appearing in documentdb-mcp. So it's a clean-up PR.

@xgerman

Copy link
Copy Markdown
Collaborator

Skill review: documentdb-query-optimizer

Architecture cost: PASS · Antipatterns: #5 (no evals — info, safe to skip for a technical reference skill) · Description quality: PASS

Verification of the PR's core claim

I cross-checked every tool name this PR now uses against upstream microsoft/documentdb-mcp/tool_list.md (pushed 2026-06-09):

  • ✅ Kept/correct: list_indexes, explain_operation, find_documents, get_statistics, current_ops, create_index, drop_index, sample_documents, list_databases — all exist.
  • ✅ Removed: optimize_find_query, explain_aggregate_query, explain_find_query, explain_count_query, collection_stats, index_stats, get_db_info — none exist upstream. Correct to drop them.

The realignment is accurate. (Note: npm documentdb-mcp-server is currently unreachable — "No versions available" — so source of truth was the upstream repo.)

Token cost

Level What loads Tokens % of 200k
L1 — always loaded frontmatter every turn 121 0.06%
L2 — on invocation SKILL.md body 2,277 1.14%
L3 — on demand references (both, summed) 2,564 1.28%
Full load everything 4,962 2.48%

SKILL.md is 278 lines (under the 500-line ceiling).

🔴 Blockers

  • none — no reference frontmatter, no PR-introduced broken links, body within limits.

🟡 Improvements

  • SKILL.md Step 2 (lines ~162–163): Stale leftover from the rename. It still tells the agent to extract indexes_stats (usage frequency) and collection_stats (doc count, avg size) "from the explain("executionStats") response." Those fields came from the old bundled optimize_find_query; raw explain_operation / .explain() does not return them — they now require a separate get_statistics call. Internally inconsistent with this PR's own change.
  • SKILL.md "MCP Tools Available" table: current_ops (and create_index / drop_index) are management tools. The kit's mcp.json ships ENABLE_MANAGEMENT_TOOLS=false, so they are not available under the default profile. The table lists current_ops as plainly available with no gate note.
  • Cross-skill (out of this PR's scope): skills/natural-language-querying/SKILL.md still references the non-existent get_db_info. The same cleanup applied here should extend there.

🟢 Strengths

  • Central claim holds: every retained tool name verifies against upstream; every removed one is genuinely absent. Clean, correct realignment.
  • Adding mongosh equivalents for each MCP tool is a real improvement — gives the skill a working path when MCP isn't connected or management tools are gated off.
  • Short spine + on-demand references preserved; architecture cost stays ~1.1% on invocation.

Recommended next step

Fix the Step 2 stale collection_stats/indexes_stats reference (point it at get_statistics) and add a one-line management-gate note for current_ops, then ship.

🤖 Generated with skill-reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants