-
Notifications
You must be signed in to change notification settings - Fork 16
update.prompt
You are updating the DynamicsCrm.DevKit MCP wiki documentation.
Read this file first, then read:
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\mcp\mcp_template_doc.md
The template is the documentation contract. Follow it unless the user explicitly asks to change the structure.
Synchronize the MCP wiki docs with the real current MCP server/tool metadata.
The docs live here:
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\mcp
Each tool gets exactly one page:
mcp_<exact_tool_name>.md
The root index lives here:
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\MCP.md
MCP.md must stay similar to:
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\Analyzers.md
That means a compact Markdown table linking to each tool page.
- The exact tool description must come from the real MCP metadata for the current build.
- Do not paraphrase
tool.descriptionin theMCP Tool Description (Exact)section. - Do not derive the final tool description from C# source comments if real MCP metadata is available.
- Do not silently delete stale tool pages. If a tool disappeared, report the stale page and ask the user before deleting it.
- Do not change
mcp_template_doc.mdunless the template itself must evolve. If you change it, explain why. - Preserve the existing page structure unless the user explicitly requests a new structure.
- Preserve file naming:
mcp_<tool.name>.md. - Update
MCP.mdwhenever tool docs are added, removed, renamed, or token counts change. - Keep generated temp metadata outside the Wiki folder, or clean it up before finishing.
- Do not run full solution builds for documentation-only work.
Preferred source:
MCP tools/list response from the currently running DevKit MCP server
MCP resources/list response from the same server
MCP resources/templates/list response from the same server
Also verify with:
devkit mcp --toolsSource code is only for cross-checking category, implementation path, related resources, output shape, behavior notes, and examples.
Important source files:
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Cli\Mcp\McpServerHost.cs
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Cli\Mcp\Tools\*.cs
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Cli\Mcp\Resources\*.cs
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Cli\Mcp\Tools\Models\*.cs
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Cli\Mcp\Tools\Helper\*.cs
McpServerHost.ToolCategoryMap is the category source:
basic
standard
advanced
Run:
Get-ChildItem -LiteralPath 'D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\mcp' -File |
Select-Object Name,Length
Get-Content -LiteralPath 'D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\mcp\mcp_template_doc.md' -TotalCount 360
Get-Content -LiteralPath 'D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\MCP.md' -TotalCount 120Confirm the existing structure before editing.
If the DevKit MCP server is available as callable tools, call a harmless read tool such as whoami.
Also run:
devkit mcp --toolsRecord the current tool count from this output.
If MCP is dead or metadata cannot be obtained, stop and tell the user to restart MCP. Do not update docs from stale memory.
Export these from the same running MCP server:
tools/list
resources/list
resources/templates/list
Save temporary JSON outside the Wiki folder, for example:
%TEMP%\devkit-mcp-docs\tools-list.json
%TEMP%\devkit-mcp-docs\resources-list.json
%TEMP%\devkit-mcp-docs\resource-templates-list.json
If the current environment exposes DevKit MCP tool definitions directly and they are confirmed to come from the same current build, those definitions may be used as equivalent metadata. Otherwise, use the real MCP protocol responses.
Build these sets:
current_tools = tool.name from tools/list
current_pages = mcp_*.md except mcp_template_doc.md and update.prompt.md
expected_pages = mcp_<tool.name>.md for each current tool
Then determine:
new tools: expected_pages not present
existing tools: expected_pages already present
stale pages: current_pages not in expected_pages
renamed tools: possible stale page + new tool pair, but do not assume
Rules:
- Create pages for new tools.
- Update pages for existing tools.
- Report stale pages. Do not delete stale pages unless the user asks.
- If a tool was renamed, create the new page and report the old page as stale.
For every current tool, create/update:
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\mcp\mcp_<tool.name>.md
Use the skeleton in mcp_template_doc.md.
Mandatory sections:
## Summary
## MCP Tool Description (Exact)
## Parameters
## Input Schema
## Related MCP Resources
## When To Use
## Notes
## Example
## Output
## Prompt Examples
The exact description section must be:
## MCP Tool Description (Exact)
```text
<tool.description copied exactly>
If description is empty:
```text
(No description returned by tools/list.)
Parameter descriptions must come from:
tool.inputSchema.properties.<parameter>.description
Required fields must come from:
tool.inputSchema.required
Defaults must come from schema defaults when present. If no default exists, write -.
Use resources from resources/list or resources/templates/list.
Related resources can be identified by:
URI/name mentioned in tool.description
URI/name mentioned in parameter description
implementation source references
resource description explicitly naming the tool family
Only list resources that are useful for that tool. Do not list every resource on every page.
If no related resources:
This tool does not require any MCP resources.
Estimate each tool's token count from the single minified JSON object for that one tool as returned by tools/list.
Use:
o200k_base
Preferred wording:
~123 tokens (tools/list tool JSON, o200k_base, measured YYYY-MM-DD)
If tokenizer is unavailable, use char_count/4 fallback and say so:
~123 tokens (tools/list tool JSON, char_count/4 fallback, measured YYYY-MM-DD)
Do not include resource bodies in the tool token count.
Every generated tool page must end with:
## Prompt Examples
- "Show me how to use `<tool.name>` to <practical scenario>."
- "Use `<tool.name>` to <practical scenario>."
- "Check <target> with `<tool.name>` and summarize what I should do next."Rules:
- Write at least three examples.
- Write examples in English.
- Make each example a natural user prompt, not a JSON input sample.
- Use practical Dataverse scenarios that match the tool purpose.
- Do not include Markdown H1 headings in generated tool pages. GitHub Wiki already renders the page title from the file name.
Use source code cross-checking to fill:
DynamicsCrm.DevKit.Cli/Mcp/Tools/<ToolClass>.cs
Do not use absolute paths inside the page summary.
Update:
D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\MCP.md
Keep the same compact table style as Analyzers.md.
Current expected columns:
Tool | Category | Estimated Tokens | Notes
-----|----------|------------------|------
One row per current tool:
`tool_name` | category | ~N tokens | [MCP title](https://github.com/phuocle/Dynamics-Crm-DevKit/wiki/mcp_tool_name)Sort rows by category order and tool name, unless the current index already has a clearly intentional order. Category order:
basic
standard
advanced
If a tool count changes, MCP.md must reflect the new count exactly.
Run a validation script or equivalent checks.
Minimum checks:
1. Current MCP tool count from devkit mcp --tools.
2. Number of generated tool pages equals current tool count.
3. Every expected filename exists.
4. Every generated page has all mandatory sections.
5. Every exact description matches tools/list exactly.
6. Every generated page has an estimated token count.
7. Every generated page has Related MCP Resources.
8. Every listed resource exists in resources/list or resources/templates/list.
9. Every generated page has a Prompt Examples section with at least three practical English prompts.
10. MCP.md has one row per current tool.
11. No temp metadata files remain in the Wiki folder.
Example verification approach:
$mcp = 'D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki\mcp'
$pages = Get-ChildItem -LiteralPath $mcp -Filter 'mcp_*.md' -File |
Where-Object { $_.Name -notin @('mcp_template_doc.md') }
$pages.CountAlso check git status:
git -C 'D:\github\Dynamics-Crm-DevKit\v5\DynamicsCrm.DevKit.Wiki' status --short -- MCP.md mcpReport:
- Current MCP tool count.
- Number of tool pages created/updated.
- New tools, if any.
- Stale pages, if any.
- Whether MCP.md was updated.
- Validation summary.
If stale pages exist and the user did not ask to delete them, explicitly say they were left in place.
- Do not update from memory.
- Do not trust old generated pages as the metadata source.
- Do not paraphrase exact descriptions.
- Do not delete stale pages silently.
- Do not hardcode the old count of 33 if MCP now exposes a different count.
- Do not place temporary JSON exports in the Wiki folder.
- Do not change unrelated Wiki files.
- Do not modify CLI source code for this documentation task.
- "Update the MCP wiki docs from the current DevKit MCP metadata, keep the exact tool descriptions, and add practical prompt examples for every tool."
- "Regenerate the documentation for all MCP tools, verify the tool count, refresh the MCP index, and report any stale pages without deleting them."
- "Add a new MCP tool page from tools/list metadata, include related resources, input schema, output notes, and at least three English prompt examples."