@dod/planax-mcp 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/tools/document.tools.js +16 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -133,7 +133,7 @@ env = { PLANAX_ACCESS_TOKEN = "your_token_here" }
|
|
|
133
133
|
- `document_get` - 문서 상세 정보
|
|
134
134
|
- `document_create_markdown` - Markdown 문서 생성
|
|
135
135
|
- `document_get_markdown_content` - Markdown 문서 내용 조회
|
|
136
|
-
- `document_update_markdown_content` - Markdown 문서 내용 수정
|
|
136
|
+
- `document_update_markdown_content` - Markdown 문서 내용 수정 (기본은 현재 버전 덮어쓰기, `createNewVersion: true` 면 새 버전 + 변경 사유)
|
|
137
137
|
- `document_upload` - 파일(PDF, Word, Excel, 이미지 등) 업로드
|
|
138
138
|
- `document_replace_file` - 기존 문서의 파일을 새 파일로 교체 (새 버전으로 올라가고 이전 버전은 이력에 남음)
|
|
139
139
|
- `document_create_placeholder` - 나중에 채울 자리표시 문서 생성
|
|
@@ -369,19 +369,21 @@ export function register({ server, apiClient }) {
|
|
|
369
369
|
|
|
370
370
|
**Note:**
|
|
371
371
|
- Only works for documents with type MARKDOWN
|
|
372
|
-
-
|
|
372
|
+
- By default, overwrites the content of the current version (the version number does not change, changeReason is ignored)
|
|
373
|
+
- Set createNewVersion: true to create a new version; changeReason is then recorded in the version history
|
|
373
374
|
|
|
374
375
|
**Examples:**
|
|
375
|
-
1.
|
|
376
|
+
1. Overwrite the current version:
|
|
376
377
|
{
|
|
377
378
|
documentId: "...",
|
|
378
379
|
content: "# Updated Title\\n\\nNew content here..."
|
|
379
380
|
}
|
|
380
381
|
|
|
381
|
-
2.
|
|
382
|
+
2. Create a new version with a change reason:
|
|
382
383
|
{
|
|
383
384
|
documentId: "...",
|
|
384
385
|
content: "# Protocol v2\\n\\nUpdated protocol...",
|
|
386
|
+
createNewVersion: true,
|
|
385
387
|
changeReason: "Updated based on review feedback"
|
|
386
388
|
}
|
|
387
389
|
|
|
@@ -390,12 +392,21 @@ export function register({ server, apiClient }) {
|
|
|
390
392
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
391
393
|
documentId: z.string().uuid().describe('Document ID (UUID) - must be MARKDOWN type'),
|
|
392
394
|
content: z.string().describe('New markdown content'),
|
|
393
|
-
|
|
395
|
+
createNewVersion: z
|
|
396
|
+
.boolean()
|
|
397
|
+
.optional()
|
|
398
|
+
.describe('true: create a new version. false or omitted (default): overwrite the current version'),
|
|
399
|
+
changeReason: z
|
|
400
|
+
.string()
|
|
401
|
+
.max(500)
|
|
402
|
+
.optional()
|
|
403
|
+
.describe('Reason for the change, recorded in the version history. Used only when createNewVersion is true'),
|
|
394
404
|
},
|
|
395
|
-
}, async ({ projectId, documentId, content, changeReason }) => {
|
|
405
|
+
}, async ({ projectId, documentId, content, createNewVersion, changeReason }) => {
|
|
396
406
|
try {
|
|
397
407
|
const result = await apiClient.patch(`/projects/${projectId}/documents/${documentId}/content`, {
|
|
398
408
|
content,
|
|
409
|
+
createNewVersion: createNewVersion ?? false,
|
|
399
410
|
changeReason,
|
|
400
411
|
});
|
|
401
412
|
return successResponse(result, 'Markdown content updated successfully');
|