microsoft / microsoft/documentdb-mcp
[DX] Improve deny / config error messages with actionable fix-hints
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 4
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 3
Description
Goal
Every error the user can fix should tell them how to fix it.
What to ship
Audit error strings in:
src/security/connectionProfiles.ts(assertProfileCapabilityAllowed,assertResourceAllowed)src/security/authorization.ts(assertAuthorized,assertCapabilityEnabled)src/tools/utils/dbGuard.tssrc/tools/utils/pipelineNamespaces.ts
Convert each to <what happened>. <how to fix>. Examples:
| Before | After |
|---|---|
Tool tier 'write' is not allowed for connection profile 'dev'. Allowed tiers: read. |
(same) To enable, add "allowedRoles": ["read","write"] to the profile. |
Database 'fleet' is denied for connection profile 'dev'. |
Database 'fleet' is explicitly denied for connection profile 'dev'. Remove it from "deniedDatabases" to allow. |
Aggregation stage \ references secrets.creds: Database 'secrets' is not allowed. |
(same) Add 'secrets' to "allowedDatabases" on the profile, or restructure the pipeline. |
Acceptance criteria
- Every user-fixable deny error includes a one-clause fix hint.
- Error format stays consistent across the codebase (one place, one shape).
- Existing tests updated to match new strings.
Why
MCP errors land in the LLM's context and get parroted back to the operator. A fix-hint shortens the support cycle for free and reduces "why doesn't this work?" GitHub issues.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by auditing the error strings in src/security/connectionProfiles.ts, src/security/authorization.ts, src/tools/utils/dbGuard.ts, and src/tools/utils/pipelineNamespaces.ts, including the named assertion functions. Update each user-fixable denial to use a consistent two-part format with an actionable hint, then update the existing tests and verify every fixable error is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100