Skip to main content
Glama
themoddedcube

pdf-report-generator

pdf-report-generator

An MCP server that generates professional corporate PDF reports from structured JSON specs or raw LLM text output. Drop it into Claude Desktop (or any MCP client) and ask Claude to turn analysis, research, or meeting notes into a polished multi-page report complete with cover page, table of contents, executive summary, section headings, tables, and charts.

A sample output is at examples/sample_report.pdf.


Prerequisites

  • Node.js 18+

  • Python 3.8+

Install Python dependencies:

pip install reportlab matplotlib

Related MCP server: PDF Export for AI Agents

Claude Desktop configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "pdf-report": {
      "command": "npx",
      "args": ["-y", "pdf-report-generator"]
    }
  }
}

Available tools

generate_report

Generates a PDF from a full structured spec.

Minimal example input:

{
  "spec": {
    "metadata": {
      "title": "Q3 Performance Review",
      "author": "Engineering Team",
      "company": "Acme Corp",
      "classification": "INTERNAL"
    },
    "executive_summary": "Overall performance improved this quarter...",
    "sections": [
      {
        "heading": "Infrastructure",
        "body": "Uptime reached 99.94%...",
        "subsections": []
      }
    ],
    "tables": [],
    "charts": []
  }
}

generate_report_from_text

Converts raw text into a structured PDF report. Sections are auto-detected from headings.

{
  "text": "# Overview\nThis quarter...\n\n# Key Findings\n...",
  "title": "Q3 Summary",
  "author": "Data Team",
  "company": "Acme Corp",
  "classification": "INTERNAL",
  "theme_name": "navy"
}

list_themes

Returns available color themes: default, navy, charcoal, forest, burgundy.


JSON spec reference

metadata
  title*          string
  subtitle        string
  author          string
  date            string (YYYY-MM-DD; defaults to today)
  company         string
  department      string
  document_id     string  (e.g. RPT-2026-001)
  classification  string  (PUBLIC | INTERNAL | CONFIDENTIAL)
  logo_path       string  (absolute path to PNG/JPG)
  page_size       "letter" | "a4"

executive_summary  string

sections[]
  heading*        string
  body*           string  (\n\n = paragraph break)
  subsections[]
    heading*      string
    body*         string

tables[]
  title           string
  headers*        string[]
  rows*           string[][]
  after_section   int  (0-based section index; -1 = after exec summary)

charts[]
  title           string
  type            "bar" | "line" | "pie" | "horizontal_bar"
  labels*         string[]
  datasets*       [{label, values[]}]
  after_section   int

images[]
  path*           string  (absolute path)
  caption         string
  width_inches    number
  after_section   int

theme
  primary_color    [R, G, B]
  accent_color     [R, G, B]
  highlight_color  [R, G, B]

Example prompts

  • "Turn this analysis into a professional internal PDF report titled 'Q3 Infrastructure Review'"

  • "Generate a corporate report from this research, add a bar chart for the monthly metrics"

  • "Create a CONFIDENTIAL report called 'Security Audit Findings' from this text"

  • "List the available report themes"


Troubleshooting

Python not found — ensure python or python3 is on your PATH and is version 3.8+.

reportlab not installed — run pip install reportlab matplotlib.

Charts missing — matplotlib is required for charts. Install it with pip install matplotlib.

Large PDFs — complex specs with many charts can take 5–15 seconds. This is normal.


License

MIT

Available Tools

3 tools
generate_reportA

Generate a professional PDF report from a structured JSON specification with metadata, sections, tables, charts, and images. Returns the PDF as base64-encoded data.

ParametersJSON Schema
NameRequiredDescriptionDefault
specYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the output format (base64-encoded PDF) and supported content types, but omits details like filesystem dependencies for image/logo paths, failure behavior on invalid specs, or potential side effects. This is partial transparency — core behavior is covered, but important operational traits are missing.

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

Conciseness5/5

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

Two sentences that are fully front-loaded with the primary verb and resource. Every clause earns its place — the input format, content summary, and output encoding are all covered with no filler or redundancy.

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?

This is a complex tool with a deeply nested, undocumented schema, no output schema, and no annotations. The two-sentence description covers the return value but not the substantial context an agent needs to build a valid `spec`: required keys, `after_section` semantics, theme expectations, default behaviors (page_size, orientation), or filesystem prerequisites for images/logo. The description is far from complete relative to the tool's complexity.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate for the single complex `spec` parameter. It adds value by naming the top-level content types (metadata, sections, tables, charts, images), which helps an agent envision the spec's shape. However, it doesn't explain required sub-structure (e.g., metadata requires a title, sections require heading/body, theme uses RGB color arrays), so the compensation is incomplete.

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 uses a specific verb ('Generate') and resource ('professional PDF report'), and specifies the exact input format ('structured JSON specification') with supported content types (metadata, sections, tables, charts, images). The phrase 'structured JSON specification' differentiates it from the sibling generate_report_from_text, which presumably handles unstructured text input.

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 phrase 'from a structured JSON specification' implies the tool is the right choice when structured JSON input is available, but it never explicitly states when to use it versus generate_report_from_text, nor does it mention exclusions or preconditions. The usage context is implied rather than explicitly stated.

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

generate_report_from_textA

Convert raw text or LLM chat output into a structured PDF report. Pass unstructured text and basic metadata — sections are detected automatically.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesRaw text or LLM output to convert into a report
titleYesReport title
authorNoAuthor name
companyNoCompany name
theme_nameNoTheme name: default, navy, charcoal, forest, burgundydefault
classificationNoClassification label: PUBLIC, INTERNAL, CONFIDENTIAL, or empty

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the automatic section detection behavior and the output being a structured PDF. However, it does not explain how the PDF is returned (e.g., file path or download link), any side effects like file creation, or limitations on input size/format, leaving gaps in behavioral transparency.

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

Conciseness5/5

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

The description is concise, two sentences, and front-loaded with the core action. Every phrase adds value, and it avoids redundancy with the schema.

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

Completeness3/5

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

Given no output schema and no annotations, the description is only moderately complete. It covers the main function and input, but omits details about the return value, how the tool differs from sibling 'generate_report', and any edge cases or preconditions. For a 6-parameter tool, more context would be needed for full autonomous invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds the concept of 'basic metadata' (mapping to author, company, theme, classification) and notes auto-detection, but does not provide additional parameter-specific semantics beyond what the schema already details.

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 uses the specific verb 'Convert' and clearly identifies the resource: 'raw text or LLM chat output' transformed into a 'structured PDF report'. This directly distinguishes it from siblings like 'generate_report' by focusing on unstructured text input and automatic section detection.

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

Usage Guidelines4/5

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

The description provides clear context: use when you have unstructured text or LLM output to convert into a PDF report. It does not explicitly name alternatives or exclusions, but the phrase 'Pass unstructured text and basic metadata' gives actionable guidance on when this tool applies.

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

list_themesA

List available color themes for PDF reports.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. The verb 'List' inherently implies a non-mutating read operation, which is a useful cue. However, it does not describe the return format or any potential edge cases (e.g., empty list, sorting). The transparency is adequate for a simple listing tool but not rich.

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

Conciseness5/5

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

The description is a single, clear sentence with no wasted words. It is front-loaded with the action verb and resource, making it easy to scan.

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

Completeness4/5

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

Given the tool's simplicity (no parameters, no output schema, no annotations) and the context from sibling tools, the description provides sufficient information for an agent to understand what the tool does. It could be improved by mentioning the output format, but the current level is adequate for a list operation.

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

Parameters4/5

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

The tool has zero parameters, so there are no parameter descriptions to add meaning. Per the baseline for 0-param tools, a score of 4 is appropriate; the description does not need to compensate for missing schema detail since there is none.

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 uses a specific verb ('List') and a clear resource ('available color themes for PDF reports'). It clearly distinguishes itself from sibling tools by indicating it provides a themed list, while siblings are for generating reports.

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 this tool is a prerequisite for generating reports with themes, but it does not explicitly state when to use it vs alternatives or mention any exclusions. Since it is the only listing tool among siblings, the intended usage is apparent but not explicitly guided.

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. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.1
    • First observedgenerate_report
    • First observedgenerate_report_from_text
    • First observedlist_themes

TDQS

A3.9/5.0
Disambiguation4/5

The two generate tools have distinct input types (raw text vs structured JSON) and clear descriptions, but their similar names could cause misselection if an agent reads quickly. list_themes is clearly separate.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern: generate_report_from_text, generate_report, list_themes. The names are predictable and descriptive.

Tool Count4/5

With 3 tools, the server is slightly on the lean side but still within a reasonable scope. Each tool has a clear purpose and no redundant tools are present.

Completeness4/5

The server covers the main report generation needs: unstructured text, structured JSON, and theme customization. Minor gaps like additional output formats or template management exist but aren't critical for the core domain.

Maintenance

ActivityInactive
ResponsivenessSyncing

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/themoddedcube/pdf-report-generator'

If you have feedback or need assistance with the MCP directory API, please join our Discord server