Skip to main content
Glama
willermo

diataxis-mcp-server

by willermo

diataxis-mcp-server

MVP TypeScript MCP server that helps coding and documentation agents apply the Diataxis framework to documentation work.

The server is deterministic. It uses small heuristics and Zod schemas; it does not call external LLM APIs.

Status

This project is experimental MVP software. The tools are intended to help agents classify, audit, and plan documentation, but the heuristics are conservative and should be reviewed by a human maintainer before large documentation refactors.

Refactor recommendations are advisory. The server suggests extraction targets, navigation groups, and possible file paths, but it does not write, move, rename, crawl, or persist files.

Related MCP server: mcp-docs-tools

What it provides

Tools:

  • classify_doc_request: classify a documentation request or draft into tutorial, how-to, reference, or explanation.

  • audit_doc_page: audit one Markdown page for mode fit, mixed-mode signals, extraction targets, and next actions.

  • audit_doc_tree: audit multiple pages and summarize the documentation architecture, missing modes, dominant modes, and suggested navigation. Accepts scope as full-docs, section, or sample so coverage warnings can be interpreted correctly.

  • suggest_doc_refactor: turn page audits into an advisory, path-aware refactoring sequence.

  • plan_doc_set: propose an initial Diataxis-aligned documentation set from a project summary.

Resources:

  • diataxis://checklists/tutorial

  • diataxis://checklists/how-to

  • diataxis://checklists/reference

  • diataxis://checklists/explanation

  • diataxis://rubrics/classification

  • diataxis://workflow/audit-existing-docs

  • diataxis://workflow/create-docs-from-scratch

Development

npm install
npm test
npm run build

Run the MCP server over stdio:

npm run build
node dist/index.js

Example MCP client command configuration:

{
  "mcpServers": {
    "diataxis": {
      "command": "node",
      "args": ["<absolute-path-to-checkout>/dist/index.js"]
    }
  }
}

IDE configuration examples are included in examples/ and in the npm package for client setup. Run npm run build before using the local dist/index.js configuration.

After this package is published to npm, clients that support npx can use:

{
  "mcpServers": {
    "diataxis": {
      "command": "npx",
      "args": ["diataxis-mcp-server"]
    }
  }
}

Example tool call

Payload for classify_doc_request:

{
  "request": "Write a guide that shows how to configure SSO for production.",
  "title": "Configure SSO",
  "audience": "Operators who already know the product"
}

Shortened example output:

{
  "mode": "how-to",
  "confidence": 0.58,
  "warnings": [],
  "rationale": "Detected how-to because the strongest signals match accomplishing a practical task.",
  "suggestedStructure": [
    "Task goal",
    "Prerequisites",
    "Procedure",
    "Verification",
    "Related reference"
  ]
}

Project layout

  • src/core: deterministic Diataxis classification, audit, refactor, and planning logic.

  • src/mcp: MCP server, tools, resources, and prompts.

  • src/content: short operational checklists and workflow text.

  • test: focused unit tests and Markdown fixtures.

  • references/diataxis: local source-of-truth notes for Diataxis-derived behavior.

Licensing

This repository uses a split license model.

  • Code, build configuration, package metadata, and tests are licensed under Apache-2.0. See LICENSE for the full license text and LICENSE-CODE.md for the code-license scope note.

  • Documentation, examples, prompts, checklists, rubrics, workflow text, and Diataxis-derived operational guidance are licensed under CC-BY-SA 4.0. See LICENSE-CONTENT.md.

  • The split license model is summarized in LICENSING.md.

  • Diataxis attribution notices are recorded in NOTICE.md.

Attribution

This project contains operational guidance derived from Diataxis.

Diataxis was created by Daniele Procida and is published at https://diataxis.fr/. The upstream repository is https://github.com/evildmp/diataxis-documentation-framework, and the upstream content license is CC-BY-SA 4.0.

This project is not affiliated with or endorsed by the Diataxis project.

Available Tools

5 tools
audit_doc_pageAudit documentation pageC

Audit a Markdown page for Diataxis mode, mixed-mode signals, and refactoring actions.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
titleNo
contentYes
declaredModeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
pageYes
findingsYes
nextActionsYes
declaredModeNo
classificationYes
modeConfusionsYes
extractionTargetsYes

TDQS

C2.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits. It states only 'audit,' implying a read operation, but lacks explicit confirmation of idempotency, safety (e.g., no destructive effects), required permissions, or whether it fetches data from a store (given optional 'path' and required 'content'). This is insufficient for an agent to understand side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the purpose, which is good, but it is too brief given the tool's complexity (4 parameters, no schema descriptions). Important details are omitted, making it under-specified rather than concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the high complexity (4 parameters, 0% schema coverage, no annotations), the description is severely incomplete. It does not explain the required input ('content' only, but 'path' may be needed), how the audit works, or what output to expect despite an output schema being present. An agent would be unable to use this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the description adds no meaning to any of the four parameters ('path', 'title', 'content', 'declaredMode'). It does not explain the role of each parameter, their optionality, or how they relate to the audit. For example, 'declaredMode' is an enum but its purpose is unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Audit a Markdown page for Diataxis mode, mixed-mode signals, and refactoring actions,' which clearly identifies the verb (audit) and resource (Markdown page) and lists three specific analyses. However, it does not differentiate from the sibling tool 'audit_doc_tree,' which presumably audits a tree of pages, leaving ambiguity about scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No usage guidelines are provided. The description does not indicate when to use this tool versus siblings like 'audit_doc_tree' or 'classify_doc_request,' nor does it mention prerequisites, context, or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

audit_doc_treeAudit documentation treeB

Audit multiple documentation pages and summarize mode distribution, confusion, and coverage. Use scope=full-docs|section|sample to control how coverage warnings are interpreted.

ParametersJSON Schema
NameRequiredDescriptionDefault
pagesYes
scopeNofull-docs

Output Schema

ParametersJSON Schema
NameRequiredDescription
pagesYes
scopeYes
summaryYes
nextActionsYes
missingModesYes
dominantModesYes
coverageWarningsYes
suggestedNavigationYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided. The description mentions the summarization focus (mode distribution, confusion, coverage) and scope interpretation, but lacks details on error handling, authentication, or write behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two clear sentences. It could be structured slightly better but is efficient with no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description does not explain the output schema or return format, nor does it clarify coverage warnings or the purpose of page properties. Given the complexity of the nested parameter, this is a notable gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%. The description explains the 'scope' enum but does not detail the nested properties of 'pages' (path, title, content, declaredMode), leaving significant ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool audits multiple documentation pages and summarizes mode distribution, confusion, and coverage. It distinguishes from siblings like 'audit_doc_page' (single page) and other tools with different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for auditing multiple pages and provides guidance on the 'scope' parameter, but does not explicitly compare to alternatives or state when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

classify_doc_requestClassify documentation requestC

Classify a documentation request or page draft into a Diataxis mode.

ParametersJSON Schema
NameRequiredDescriptionDefault
titleNo
requestYes
audienceNo
declaredModeNo
existingContentNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
modeYes
scoresYes
evidenceYes
warningsYes
rationaleYes
confidenceYes
dimensionsYes
suggestedStructureYes

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries full burden for behavioral disclosure. It only states the classification outcome but does not reveal how classification works, whether it modifies state, requires specific inputs, or has side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, which is under-specified for a tool with 5 parameters. Conciseness requires appropriate size; here detail is missing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters, missing schema descriptions, and no annotations, the description should compensate but fails to provide complete context. The existence of an output schema is not leveraged.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 5 parameters with 0% description coverage, yet the tool description provides no explanation of any parameter beyond the tool's general function. Parameters like title, audience, declaredMode, and existingContent are left entirely undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action: classify a documentation request or page draft into a Diataxis mode. It uses a specific verb and resource, and it distinguishes from sibling tools like audit, plan, and suggest, which have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like audit_doc_page or plan_doc_set. The description does not mention prerequisites, context, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

plan_doc_setPlan documentation setC

Suggest an initial Diataxis-aligned documentation set from a project summary.

ParametersJSON Schema
NameRequiredDescriptionDefault
audienceNo
userGoalsNo
constraintsNo
projectNameYes
projectSummaryYes
publicInterfacesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
nextActionsYes
projectNameYes
gapsToResolveYes
recommendedPagesYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must fully disclose behavioral traits. It only states what the tool does, but does not explain any internal behavior, side effects, or limitations (e.g., whether it performs any external calls or requires specific input formats).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with no wasted words. It front-loads the core action and object. However, it could be slightly improved by including key qualifiers upfront.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 6 parameters and an output schema, but the description omits any information about what the output will be (e.g., a list of documentation topics) and does not guide the user on how to supply effective inputs. The brevity leaves the agent with insufficient context to use the tool confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 6 parameters and 0% schema description coverage, the description does not explain any parameters beyond the one implied by 'from a project summary.' No details on audience, userGoals, constraints, or publicInterfaces are provided, failing to add value over the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool suggests an initial Diataxis-aligned documentation set from a project summary. The verb 'suggest' and resource 'documentation set' are specific, and it distinguishes from sibling tools like 'suggest_doc_refactor' which focuses on refactoring.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives such as 'classify_doc_request' or 'suggest_doc_refactor'. It lacks any context about prerequisites or typical use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

suggest_doc_refactorSuggest documentation refactorC

Create an incremental refactoring sequence from documentation page audits.

ParametersJSON Schema
NameRequiredDescriptionDefault
pagesYes
objectiveNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
actionsYes
sequenceYes
objectiveNo

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description fails to disclose behavioral traits like whether the tool is read-only, required permissions, or limitations. It only hints at input being audits but does not elaborate on side effects or output nature.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise but lacks structure and detail. It conveys the core purpose but misses opportunities to break down components or add brevity with meaningful content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of nested parameters and the existence of an output schema, the description is insufficient. It does not elaborate on prerequisites for the input or the format of the refactoring sequence, leaving gaps for an agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 2 parameters, the description provides no additional meaning beyond the schema. It does not explain the structure of the 'pages' array or the purpose of 'objective', making it inadequate for parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the action ('Create') and the resource ('incremental refactoring sequence from documentation page audits'), distinguishing it from sibling tools like audit_doc_page and plan_doc_set.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, such as after running audits or instead of plan_doc_set. The description lacks context for appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool update
    • Changedaudit_doc_tree3 fields changed
      • addedInput schema / properties / scope
        Added value: +{
        +  "default": "full-docs",
        +  "enum": [
        +    "full-docs",
        +    "section",
        +    "sample"
        +  ],
        +  "type": "string"
        +}
      • addedOutput schema / properties / scope
        Added value: +{
        +  "enum": [
        +    "full-docs",
        +    "section",
        +    "sample"
        +  ],
        +  "type": "string"
        +}
      • changedOutput schema / required
        Previous value: -[
        -  "pages",
        -  "summary",
        -  "missingModes",
        -  "dominantModes",
        -  "coverageWarnings",
        -  "suggestedNavigation",
        -  "nextActions"
        -]New value: +[
        +  "scope",
        +  "pages",
        +  "summary",
        +  "missingModes",
        +  "dominantModes",
        +  "coverageWarnings",
        +  "suggestedNavigation",
        +  "nextActions"
        +]
  2. 5 tool updatesv0.1.0
    • First observedaudit_doc_page
    • First observedaudit_doc_tree
    • First observedclassify_doc_request
    • First observedplan_doc_set
    • First observedsuggest_doc_refactor

TDQS

B3.3/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a distinct purpose: auditing single pages, auditing multiple pages, classifying requests, planning sets, and suggesting refactorings. No two tools overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (audit_doc_page, audit_doc_tree, classify_doc_request, plan_doc_set, suggest_doc_refactor), making the naming predictable and clear.

Tool Count5/5

Five tools is an appropriate number for a focused documentation assistant covering audit, classification, planning, and refactoring. It is neither too few nor too many.

Completeness5/5

The tool set covers the core workflows for Diataxis documentation: auditing (single and tree), classification, initial planning, and refactoring. No obvious gaps are present for the intended domain.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers