Skip to main content
Glama

export_html

Write a self-contained HTML view of your KSJ knowledge base to browse captures, tags, and connections offline in any browser, and share or archive a snapshot.

Instructions

Write a self-contained HTML view of the knowledge base — a bird's-eye
browser for the whole journal that opens in any web browser, works
offline, and needs no install.

Three tabs, plus connections on every card:
  Timeline    — every capture chronologically, with live search and
                type / Wild Art reason / volume / journal-vs-AI filters
                (WA and ISO are always in the type filter); superseded
                captures hidden behind a toggle. Each card lists its
                typed connections — click one to jump to that capture.
                Wild Art cards show their reason, the page ID they were
                read as, and a link to the capture they conflict with.
  Index       — tags grouped by meaning (topics, dream themes, open
                questions, insights, motifs, sensory details) plus the
                entity register; every entry click-filters the timeline.
  Graph       — an ego-centric local graph (no rotating globe, no
                physics). The landing view groups captures into bubbles
                by tag, theme, or entity (size = capture count). Click a
                bubble, or "view in graph" on any card, to drill into a
                fixed radial layout: the item centered, its direct
                connections (or a cluster's members) around it. Click a
                neighbor to recenter; "+N more" expands a busy ring.

Navigation: every view change is a browser history step mirrored in the
URL hash, so the in-app "← Back" button AND the browser's Back button
step back through views inside the page (the browser's leaves the page
only from the first view), and reloading reopens the same view.

The footer records the ksj-mcp, mcp, pydantic, and Python versions, the
export time, and capture / entity / connection counts.

All data is inlined in the file: sharing or archiving the file shares a
snapshot of the knowledge base.

Args:
    file_path: Where to write. Default (recommended, and required on
               Windows): leave empty — writes ksj-view.html in the KSJ
               data directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.9.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It over-delivers on output behavior (tabs, navigation, footer versions, inlined data / snapshot semantics) which is genuinely useful, but it says nothing about permissions needed, whether the file is overwritten, or side effects on existing files. For a write-to-disk tool, that mutation/permission context is missing.

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 bulk of the description is a UI feature tour (tabs, controls, graph layout, history behavior) rather than information an agent needs to invoke the tool. It is heavily back-loaded: the only actionable invocation guidance (file_path) sits at the very end. For an agent-selection definition this is bloated and mis-front-loaded.

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?

With an output schema present, return-value explanation isn't needed, so the heavy UI description is largely redundant for invocation. The description covers the write target and snapshot semantics adequately, but omits the deployment-adjacent essentials: overwrite behavior, error conditions, and why this tool versus the other export siblings.

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?

Schema description coverage is 0%, so the description must compensate. It does: the Args section explains file_path is where to write, that the default (empty) writes ksj-view.html into the KSJ data directory, and that empty is recommended and required on Windows. That is meaningful semantics beyond the bare string type, though it doesn't cover format/overwrite behavior.

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 clearly states the verb and artifact: write a self-contained HTML bird's-eye browser of the whole knowledge base. It distinguishes itself from sibling exports (export_backup, export_captures, export_study_deck) by describing an interactive offline viewer. However, it never explicitly names those siblings or states contrast, so it's clear on purpose but not sharply differentiated.

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?

Usage context is implied — you'd call this to get a shareable, offline-viewable snapshot — but the description never says when to prefer this over export_backup, export_captures, or export_study_deck. There is no when-not-to-use guidance or alternative routing, so it falls to the minimum-viable tier.

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