Serveur MCP

Ebook File Check

com.powmcp/epub-check
Outils développeur Médias et contenu Public et accessible MCP 2025-11-25

Ce que fait ce MCP

Validates EPUB files against EPUB specifications and compares builds for regressions and fixed findings.

ebook_check
Validates one EPUB (a directly hosted public URL or a file attached in chat) against the EPUB 2/3 specification using a pinned local EPUBCheck 5.4.0 engine run in a no-network sandbox. Each call takes exactly one source: the url parameter or the file attachment, never both. Returns the automated verdict: pass boolean, EPUB version, message counts by severity (fatal/error/warning/usage), findings grouped most-severe-first with EPUBCheck rule id (RSC-005, OPF-014, …), file path and line/column, plus a structural inventory (spine items, media types, remote-resource state), SHA-256 of the exact bytes, and truncation metadata. Use for one-file readiness and diagnosis: 'is this ebook valid', 'does this EPUB have specification problems before upload', 'what is wrong with it'. A pass means only that the bytes satisfied the automated profile; it never renders the book, judges accessibility, or guarantees any store will accept it, and human review of how the book reads and looks is always required. Downloads and validates a live EPUB under a 110-second call deadline; tell the user before the call.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'properties': {'url': {'type': 'string', 'pattern': '^https?://', 'description': 'Direct public HTTP(S) URL to the EPUB file bytes, including the protocol, not a ChatGPT file id, local path, cloud-drive share, archive/viewer page, or authenticated URL needing a login. Each call takes either URL sources or attached-file sources, never both\n\nSTRICT RULE: Ebook check failed: provide either an EPUB URL or an attached EPUB file, not both\nSTRICT RULE: Ebook check failed: provide a public EPUB URL or attach the EPUB file'}, 'file': {'type': 'object', 'required': ['download_url', 'file_id'], 'properties': {'file_id': {'type': 'string', 'description': 'ChatGPT file id for the attached file'}, 'file_name': {'type': 'string', 'description': 'Original file name when ChatGPT knows it'}, 'mime_type': {'type': 'string', 'description': 'MIME type when ChatGPT knows it'}, 'download_url': {'type': 'string', 'description': 'Temporary authorized download URL supplied by ChatGPT; fetch it only while handling this tool call'}}, 'description': 'An EPUB file attached in chat, up to 25 MB, validated from its exact bytes. Provide either this attachment or url, never both.', 'additionalProperties': False}, 'maxMessages': {'type': 'integer', 'maximum': 500, 'minimum': 1, 'description': 'Maximum spec findings to return, most severe first (default 200); raise it to see more of a very noisy book, lower it to keep the answer short'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'required': ['requestedUrl', 'finalUrl', 'redirects', 'sha256', 'bytes', 'fetchedAt', 'engineVersion', 'ruleProfileDate', 'pass', 'epubVersionDetected', 'counts', 'findings', 'inventory', 'humanReviewRequired', 'humanReviewItems', 'nonclaims', 'truncation', 'processingMs'], 'properties': {'pass': {'type': 'boolean', 'description': 'True when the EPUB has no fatal or error messages against the automated profile'}, 'bytes': {'type': 'number', 'description': 'Downloaded EPUB size in bytes'}, 'counts': {'type': 'object', 'required': ['fatal', 'error', 'warning', 'usage'], 'properties': {'error': {'type': 'number', 'description': 'Error messages: spec violations that fail validation and typically block store uploads'}, 'fatal': {'type': 'number', 'description': 'Fatal messages: the container could not be fully processed'}, 'usage': {'type': 'number', 'description': 'Usage messages: informational notices about optional or unusual constructs'}, 'warning': {'type': 'number', 'description': 'Warning messages: advisory issues that do not fail validation'}}, 'description': 'Counts of EPUBCheck findings grouped by severity', 'additionalProperties': False}, 'sha256': {'type': 'string', 'description': 'SHA-256 hash of the exact validated bytes'}, 'finalUrl': {'type': 'string', 'description': 'URL after redirects, with query string and fragment stripped'}, 'findings': {'type': 'array', 'items': {'type': 'object', 'required': ['label', 'ruleId', 'severity', 'message', 'additionalLocations'], 'properties': {'line': {'type': 'number', 'description': 'Line number of the issue, when the engine reports one'}, 'path': {'type': 'string', 'description': 'File path inside the EPUB where the issue was found'}, 'label': {'type': 'string', 'description': 'Short display identity combining the EPUBCheck rule id with its primary file path and reported line'}, 'column': {'type': 'number', 'description': 'Column number of the issue, when the engine reports one'}, 'ruleId': {'type': 'string', 'description': 'EPUBCheck message id, e.g. RSC-005, OPF-014, HTM-004'}, 'message': {'type': 'string', 'description': 'What the rule reports'}, 'severity': {'type': 'string', 'description': 'FATAL, ERROR, WARNING, or USAGE'}, 'suggestion': {'type': 'string', 'description': 'Engine-provided remediation hint, when present'}, 'additionalLocations': {'type': 'number', 'description': 'How many further locations share this finding beyond the one shown'}}, 'additionalProperties': False}, 'description': 'Bounded spec findings, most severe first, capped by maxMessages'}, 'fetchedAt': {'type': 'string', 'description': 'ISO timestamp the EPUB was fetched and validated'}, 'inventory': {'type': 'object', 'required': ['spineItemCount', 'containerItemCount', 'mediaTypes', 'scripted', 'fixedFormat', 'hasAudio', 'hasVideo', 'hasEncryption', 'embeddedFontCount', 'remoteResources', 'containerEntryCount', 'decompressedBytes'], 'properties': {'hasAudio': {'type': 'boolean', 'description': 'True when the publication embeds audio'}, 'hasVideo': {'type': 'boolean', 'description': 'True when the publication embeds video'}, 'scripted': {'type': 'boolean', 'description': 'True when the publication contains scripting'}, 'mediaTypes': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Distinct declared media types present in the publication'}, 'fixedFormat': {'type': 'boolean', 'description': 'True for fixed-layout publications'}, 'hasEncryption': {'type': 'boolean', 'description': 'True when the container declares encryption'}, 'spineItemCount': {'type': 'number', 'description': 'Number of reading-order spine items'}, 'remoteResources': {'type': 'object', 'required': ['state', 'referencedFontCount'], 'properties': {'state': {'anyOf': [{'type': 'string', 'const': 'referenced', 'description': "Distinguished state: 'referenced' when remote resources or remote fonts are used, 'none-detected' when the engine found none (absence of evidence, not a guarantee of none)"}, {'type': 'string', 'const': 'none-detected', 'description': "Distinguished state: 'referenced' when remote resources or remote fonts are used, 'none-detected' when the engine found none (absence of evidence, not a guarantee of none)"}], 'description': "Distinguished state: 'referenced' when remote resources or remote fonts are used, 'none-detected' when the engine found none (absence of evidence, not a guarantee of none)"}, 'referencedFontCount': {'type': 'number', 'description': 'Count of remotely referenced fonts'}}, 'description': 'Detected remote-resource references and referenced font count', 'additionalProperties': False}, 'decompressedBytes': {'type': 'number', 'description': 'Total declared decompressed size of the container in bytes'}, 'embeddedFontCount': {'type': 'number', 'description': 'Number of fonts embedded in the container'}, 'containerItemCount': {'type': 'number', 'description': 'Number of manifest/container items EPUBCheck inspected'}, 'containerEntryCount': {'type': 'number', 'description': 'Total ZIP entries in the container'}}, 'description': 'Structural inventory reported for the EPUB container', 'additionalProperties': False}, 'nonclaims': {'type': 'array', 'items': {'type': 'string'}, 'description': 'What this automated result does not establish'}, 'redirects': {'type': 'number', 'description': 'Redirect hops followed'}, 'truncation': {'type': 'object', 'required': ['findingsTruncated', 'totalFindings', 'returnedFindings', 'maxMessages'], 'properties': {'maxMessages': {'type': 'number', 'description': 'The applied per-call findings cap'}, 'totalFindings': {'type': 'number', 'description': 'Total findings the engine produced'}, 'returnedFindings': {'type': 'number', 'description': 'Findings actually returned after the maxMessages cap'}, 'findingsTruncated': {'type': 'boolean', 'description': 'True when more findings exist than were returned'}}, 'description': 'Finding totals and the applied limit on returned findings', 'additionalProperties': False}, 'contentType': {'type': 'string', 'description': 'Content-Type the server returned'}, 'epubVersion': {'type': 'string', 'description': 'Detected EPUB version, e.g. 2.0.1 or 3.0; omitted when the engine could not detect it'}, 'processingMs': {'type': 'number', 'description': 'Total processing time in milliseconds'}, 'requestedUrl': {'type': 'string', 'description': "The checked EPUB source: the submitted URL with query and fragment stripped, or the attached file's name"}, 'engineVersion': {'type': 'string', 'description': 'EPUBCheck engine version that produced the verdict'}, 'ruleProfileDate': {'type': 'string', 'description': 'Release date of the pinned EPUBCheck rule profile'}, 'humanReviewItems': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Checks only a qualified human can perform'}, 'epubVersionDetected': {'type': 'boolean', 'description': 'Distinguished state: false means the version could not be detected, distinct from a detected-but-invalid version'}, 'humanReviewRequired': {'type': 'boolean', 'description': 'Always true: automated conformance never covers how the book reads or renders'}}, 'additionalProperties': False}
ebook_compare
Runs the identical pinned EPUBCheck 5.4.0 validation over exactly two EPUB builds (directly hosted public URLs or files attached in chat, baseline first, revised second) sequentially under one shared 110-second deadline, then reports which spec findings regressed or were fixed between them. Returns per-build hashes, EPUB versions, pass verdicts and severity counts, a regressions list (rules that appear or worsen in the revised build) and a fixed list (rules removed or reduced), and a ranking by pass state then fewer blocking findings. Use for 'did my re-export get worse', 'which build has fewer problems', and revision-over-revision questions. The ranking orders automated conformance only (it never means one build renders, reads, or sells better), and when both builds tie on pass state and blocking count it names no winner rather than crowning the first submission. It also flags when the two files declare different titles, since that usually means they are not two builds of one book. Human review remains required for both builds. A comparison can take up to 110 seconds under its shared deadline; tell the user before the call.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'properties': {'urls': {'type': 'array', 'items': {'type': 'string', 'pattern': '^https?://', 'description': 'Direct public HTTP(S) URL to the EPUB file bytes, including the protocol, not a ChatGPT file id, local path, cloud-drive share, archive/viewer page, or authenticated URL needing a login. Each call takes either URL sources or attached-file sources, never both'}, 'maxItems': 2, 'minItems': 2, 'description': 'Exactly two distinct direct public HTTP(S) EPUB URLs: the baseline build first, the revised build second. Provide either these URLs or files, never both.\n\nSTRICT RULE: Ebook compare failed: provide either two EPUB URLs or two attached EPUB files, not both\nSTRICT RULE: Ebook compare failed: provide two public EPUB URLs or attach two EPUB build files'}, 'files': {'type': 'array', 'items': {'type': 'object', 'required': ['download_url', 'file_id'], 'properties': {'file_id': {'type': 'string', 'description': 'ChatGPT file id for the attached file'}, 'file_name': {'type': 'string', 'description': 'Original file name when ChatGPT knows it'}, 'mime_type': {'type': 'string', 'description': 'MIME type when ChatGPT knows it'}, 'download_url': {'type': 'string', 'description': 'Temporary authorized download URL supplied by ChatGPT; fetch it only while handling this tool call'}}, 'description': 'An EPUB build file attached in chat, up to 25 MB, validated from its exact bytes.', 'additionalProperties': False}, 'maxItems': 2, 'minItems': 2, 'description': 'Exactly two distinct EPUB builds attached in chat: the baseline build first, the revised build second. Provide either these attachments or urls, never both.'}, 'maxMessages': {'type': 'integer', 'maximum': 300, 'minimum': 1, 'description': 'Maximum findings to collect per build for the comparison (default 150)'}}, 'description': 'STRICT RULE: Ebook compare failed: the two sources must be distinct builds', 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'required': ['engineVersion', 'ruleProfileDate', 'documents', 'regressions', 'fixed', 'ranking', 'limits', 'humanReviewRequired', 'humanReviewItems', 'nonclaims', 'truncated', 'processingMs', 'comparedAt'], 'properties': {'fixed': {'type': 'array', 'items': {'type': 'object', 'required': ['ruleId', 'severity', 'description', 'baselineCount', 'revisedCount'], 'properties': {'ruleId': {'type': 'string', 'description': 'EPUBCheck message id that differs between builds'}, 'severity': {'type': 'string', 'description': 'Severity of the rule in the build where it appears'}, 'description': {'type': 'string', 'description': 'Representative message text for the rule'}, 'revisedCount': {'type': 'number', 'description': 'Occurrences in the second (revised) build'}, 'baselineCount': {'type': 'number', 'description': 'Occurrences in the first (baseline) build'}}, 'additionalProperties': False}, 'description': 'Rules removed or reduced in the revised build versus the baseline'}, 'limits': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Conclusions this automated comparison cannot support'}, 'ranking': {'type': 'array', 'items': {'type': 'object', 'required': ['rank', 'url'], 'properties': {'url': {'type': 'string', 'description': "Build source: the submitted URL query- and fragment-stripped, or the attached file's name"}, 'pass': {'type': 'boolean', 'description': 'Automated pass verdict'}, 'rank': {'type': 'number', 'description': '1-based rank by automated conformance evidence'}, 'failed': {'type': 'string', 'description': 'Why this build could not be validated, when it could not'}, 'blockingCount': {'type': 'number', 'description': 'Fatal + error messages for this build'}}, 'additionalProperties': False}, 'description': 'Builds ranked by pass state then fewer blocking findings; unvalidatable builds last'}, 'documents': {'type': 'array', 'items': {'type': 'object', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': "The checked EPUB source: the submitted URL with query and fragment stripped, or the attached file's name"}, 'pass': {'type': 'boolean', 'description': 'True when the build has no fatal or error messages'}, 'bytes': {'type': 'number', 'description': 'Downloaded EPUB size in bytes'}, 'counts': {'type': 'object', 'required': ['fatal', 'error', 'warning', 'usage'], 'properties': {'error': {'type': 'number', 'description': 'Error messages: spec violations that fail validation and typically block store uploads'}, 'fatal': {'type': 'number', 'description': 'Fatal messages: the container could not be fully processed'}, 'usage': {'type': 'number', 'description': 'Usage messages: informational notices about optional or unusual constructs'}, 'warning': {'type': 'number', 'description': 'Warning messages: advisory issues that do not fail validation'}}, 'description': 'Counts of EPUBCheck findings grouped by severity for this build', 'additionalProperties': False}, 'failed': {'type': 'string', 'description': 'Why this build could not be validated, when it could not'}, 'sha256': {'type': 'string', 'description': 'SHA-256 hash of the exact validated bytes'}, 'epubVersion': {'type': 'string', 'description': 'Detected EPUB version'}, 'findingsTruncated': {'type': 'boolean', 'description': "True when this build's findings were capped by maxMessages"}}, 'additionalProperties': False}, 'description': 'Per-build hashes, versions, and verdicts in submitted order (baseline first, revised second)'}, 'nonclaims': {'type': 'array', 'items': {'type': 'string'}, 'description': 'What these automated results do not establish'}, 'truncated': {'type': 'boolean', 'description': "True when either build's findings were truncated, which can make the difference table incomplete"}, 'comparedAt': {'type': 'string', 'description': 'ISO timestamp of the comparison'}, 'regressions': {'type': 'array', 'items': {'type': 'object', 'required': ['ruleId', 'severity', 'description', 'baselineCount', 'revisedCount'], 'properties': {'ruleId': {'type': 'string', 'description': 'EPUBCheck message id that differs between builds'}, 'severity': {'type': 'string', 'description': 'Severity of the rule in the build where it appears'}, 'description': {'type': 'string', 'description': 'Representative message text for the rule'}, 'revisedCount': {'type': 'number', 'description': 'Occurrences in the second (revised) build'}, 'baselineCount': {'type': 'number', 'description': 'Occurrences in the first (baseline) build'}}, 'additionalProperties': False}, 'description': 'Rules that appear or worsen in the revised build versus the baseline'}, 'processingMs': {'type': 'number', 'description': 'Total processing time in milliseconds'}, 'engineVersion': {'type': 'string', 'description': 'EPUBCheck engine version that produced the verdicts'}, 'ruleProfileDate': {'type': 'string', 'description': 'Release date of the pinned EPUBCheck rule profile'}, 'humanReviewItems': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Checks only a qualified human can perform'}, 'humanReviewRequired': {'type': 'boolean', 'description': 'Always true: automated conformance never covers how either build reads or renders'}}, 'additionalProperties': False}
Modifié
ebook_compare
27 September 2026 02:53
Modifié
ebook_check
27 September 2026 02:53
Ajouté
ebook_compare
17 September 2026 12:36
Ajouté
ebook_check
17 September 2026 12:36