create_or_update_rule
Record new patterns, decisions, or changes by creating or updating documentation rules. Keep project docs current for future AI agents.
Instructions
Create or update documentation as you discover new patterns, decisions, or changes. Use this to keep docs current for future agents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileName | Yes | Documentation file name. Must end with .md. Example: "api-patterns.md" | |
| title | Yes | Document title for display and search | |
| description | No | Brief summary of the document's purpose | |
| keywords | No | Search keywords. Include technologies, patterns, and concepts covered | |
| filePatterns | No | Optional file globs for contextual docs. Examples: ["**/*.test.js"] | |
| topics | No | Optional topical tags to group related documents | |
| category | No | Optional category label for this document | |
| alwaysApply | No | Mark this doc as always-apply guidance for every task | |
| content | Yes | Full markdown content of the documentation |
Implementation Reference
- src/index.js:242-289 (schema)Tool schema definition including input validation (inputSchema with properties like fileName, title, keywords, content, etc.) and required fields (fileName, title, content).
name: 'create_or_update_rule', description: 'Create or update documentation as you discover new patterns, decisions, or changes. Use this to keep docs current for future agents.', inputSchema: { type: 'object', properties: { fileName: { type: 'string', description: 'Documentation file name. Must end with .md. Example: "api-patterns.md"' }, title: { type: 'string', description: 'Document title for display and search' }, description: { type: 'string', description: 'Brief summary of the document\'s purpose' }, keywords: { type: 'array', items: { type: 'string' }, description: 'Search keywords. Include technologies, patterns, and concepts covered' }, filePatterns: { type: 'array', items: { type: 'string' }, description: 'Optional file globs for contextual docs. Examples: ["**/*.test.js"]' }, topics: { type: 'array', items: { type: 'string' }, description: 'Optional topical tags to group related documents' }, category: { type: 'string', description: 'Optional category label for this document' }, alwaysApply: { type: 'boolean', description: 'Mark this doc as always-apply guidance for every task' }, content: { type: 'string', description: 'Full markdown content of the documentation' } }, required: ['fileName', 'title', 'content'] } },