document-mcp 2.1.47 → 3.0.0
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/bin.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -210,7 +210,7 @@ Every tool that takes or produces document bytes goes through the same two hybri
|
|
|
210
210
|
| `metadata_write` | Patches a document's title/author/subject/keywords in place. Does not convert format — source and target format must match (or both be `pdf`); odf (a standalone formula document) is rejected as either, since it has no write path back out at all. |
|
|
211
211
|
| `fonts` | Lists every source-embedded font face a docx/pptx/odt/odp/ods/odg document carries (family, weight/style, byte length). |
|
|
212
212
|
| `describe_font_file` | Reads a standalone `.ttf`/`.otf` font file and reports the family/bold/italic triple it declares about itself. |
|
|
213
|
-
| `docx_extras` | Reads a docx's own comments, footnotes,
|
|
213
|
+
| `docx_extras` | Reads a docx's own comments, footnotes, header/footer parts, and numbering definitions — data the `ContentDocument` pivot cannot carry, so no other tool sees it. |
|
|
214
214
|
| `pdf_inspect` | Parses a PDF and reports a summary (page count, per-page size and item-kind histogram, metadata, embedded image formats), or with `full: true` the entire parsed `LayoutDocument` as plain JSON — no `$schema` stamp, since that family moved to `pdf-codec` at `document-schema.js` 4.0.0 and lost its schema-stamped envelope. |
|
|
215
215
|
| `odm_to_pdf` | Converts a `.odm` (ODF master document) to PDF. A `.odm` never carries its chapters' content inline, so each chapter resolves via a caller-supplied `chapters` href-to-document map and/or a `chaptersDir` searched by basename. |
|
|
216
216
|
| `from_package` | Rebuilds real document bytes in a target format from a `DocumentPackage` previously serialised to JSON (e.g. by a conversion tool's own `onDocument`/package-dump step). Only a package genuinely written by a current dump round-trips: the `$schema` URI it carries pins the `document-schema.js` release that wrote it, and a pre-4.0.0 dump (the flat `{ formatVersion, content, pages }` envelope) is rejected with an error naming the pinned release, the flat-to-tree change, and the remedy — a layout-document dump gets its own pointer, naming the move to `pdf-codec`. |
|
package/dist/bin.js
CHANGED
|
@@ -8,7 +8,7 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
8
8
|
import { basename, join } from "node:path";
|
|
9
9
|
import { buildOutline, isOutlineNode, outlineLeafText } from "document-outline.js";
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "
|
|
11
|
+
var version = "3.0.0";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/io/document-input.ts
|
|
14
14
|
const EXTENSION_TO_FORMAT = {
|
|
@@ -211,7 +211,7 @@ function registerConvertTools(server) {
|
|
|
211
211
|
function registerDocxExtrasTools(server) {
|
|
212
212
|
server.registerTool("docx_extras", {
|
|
213
213
|
title: "Docx extras",
|
|
214
|
-
description: "Reads a docx's own comments, footnotes,
|
|
214
|
+
description: "Reads a docx's own comments, footnotes, header/footer parts, and numbering definitions -- data documents.js's ContentDocument pivot cannot carry, so ordinary document-reading tools never see it. Returns the real DocxExtras object (comments/footnotes/headerFooterParts/sectionHeaderFooters/numbering) as structured data.",
|
|
215
215
|
inputSchema: z.object({ source: DocumentInputSchema.describe("The docx document to read.") })
|
|
216
216
|
}, async ({ source }) => {
|
|
217
217
|
const { bytes } = await resolveDocumentInput(source);
|
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ let node_fs = require("node:fs");
|
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
let document_outline_js = require("document-outline.js");
|
|
9
9
|
//#region package.json
|
|
10
|
-
var version = "
|
|
10
|
+
var version = "3.0.0";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/io/document-input.ts
|
|
13
13
|
const EXTENSION_TO_FORMAT = {
|
|
@@ -210,7 +210,7 @@ function registerConvertTools(server) {
|
|
|
210
210
|
function registerDocxExtrasTools(server) {
|
|
211
211
|
server.registerTool("docx_extras", {
|
|
212
212
|
title: "Docx extras",
|
|
213
|
-
description: "Reads a docx's own comments, footnotes,
|
|
213
|
+
description: "Reads a docx's own comments, footnotes, header/footer parts, and numbering definitions -- data documents.js's ContentDocument pivot cannot carry, so ordinary document-reading tools never see it. Returns the real DocxExtras object (comments/footnotes/headerFooterParts/sectionHeaderFooters/numbering) as structured data.",
|
|
214
214
|
inputSchema: zod.z.object({ source: DocumentInputSchema.describe("The docx document to read.") })
|
|
215
215
|
}, async ({ source }) => {
|
|
216
216
|
const { bytes } = await resolveDocumentInput(source);
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
6
6
|
import { basename, join } from "node:path";
|
|
7
7
|
import { buildOutline, isOutlineNode, outlineLeafText } from "document-outline.js";
|
|
8
8
|
//#region package.json
|
|
9
|
-
var version = "
|
|
9
|
+
var version = "3.0.0";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/io/document-input.ts
|
|
12
12
|
const EXTENSION_TO_FORMAT = {
|
|
@@ -209,7 +209,7 @@ function registerConvertTools(server) {
|
|
|
209
209
|
function registerDocxExtrasTools(server) {
|
|
210
210
|
server.registerTool("docx_extras", {
|
|
211
211
|
title: "Docx extras",
|
|
212
|
-
description: "Reads a docx's own comments, footnotes,
|
|
212
|
+
description: "Reads a docx's own comments, footnotes, header/footer parts, and numbering definitions -- data documents.js's ContentDocument pivot cannot carry, so ordinary document-reading tools never see it. Returns the real DocxExtras object (comments/footnotes/headerFooterParts/sectionHeaderFooters/numbering) as structured data.",
|
|
213
213
|
inputSchema: z.object({ source: DocumentInputSchema.describe("The docx document to read.") })
|
|
214
214
|
}, async ({ source }) => {
|
|
215
215
|
const { bytes } = await resolveDocumentInput(source);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "MCP (Model Context Protocol) server exposing documents.js's document-conversion, .odb, metadata, and font tooling as MCP tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
90
90
|
"document-outline.js": "^2.0.0",
|
|
91
|
-
"documents.js": "^
|
|
91
|
+
"documents.js": "^5.0.0",
|
|
92
92
|
"zod": "^4.2.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|