Skip to main content
Glama

add_html_tool

Create a new HTML tool in the workspace resources/html directory and persist its data through connected sheets, databases, and settings instead of browser storage.

Instructions

Create a new HTML tool in the workspace resources/html directory. Call get_html_tool_guide first. A design-system baseline (tokens, dark mode, form/button styles) is auto-injected into HTML files at save — do not include CSS resets or base styles. Persist records in a Sheet: declare it in sheets (created in documents/Tools, or connect an existing sheet by name) and use await hillnote.sheet('Name') -> rows()/add()/update()/remove()/onChange(). Existing databases go in databases -> await hillnote.database('Name'). Mark the main source primary: true and read it with await hillnote.data() (add_tool_view then shows the tool as a Custom view tab of a database/sheet, where data() is that view's rows). Small state goes in hillnote.settings.get/set. Never use localStorage/sessionStorage/IndexedDB/cookies — they don't persist in the tool sandbox. The result includes a validation summary (if validation.issues is empty, do not read files back) and each sheet's column ids — key rows by column id.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspacePath": "<workspacePath>",
      "toolName": "<toolName>",
      "files": "<files>"
    },
    "name": "add_html_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesFiles to create. Prefer a single self-contained index.html (all CSS/JS inline); sibling files (style.css, app.js, modules, extra pages) in the tool folder also load.
glyphNoEmoji glyph for the tool tile (e.g. "📊", "🎨")
sheetsNoSheets the tool stores its records in (max 20). With columns: creates a NEW sheet at documents/Tools/<name>, owned by this tool. Name only: connects an EXISTING sheet found by its name or folder name — the user approves access once. The tool code reaches each one with await hillnote.sheet(name). Everything is validated before anything is written.
categoryNoOptional category for organizing tools (e.g., "games", "utilities", "visualizations")
toolNameYesName of the HTML tool (will be used as folder name)
databasesNoEXISTING databases (folders of row documents) the tool reads/writes (max 20), found by name or folder name — connect-only; tools never create databases. The user approves access once. The tool code reaches each one with await hillnote.database(name); row ids are the row documents' filenames and setting title renames the row.
descriptionNoBrief description of what this HTML tool does
workspacePathYesAbsolute path to the workspace directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.19.0
    • addedInput schema / properties / databases
      Added value: +{
      +  "description": "EXISTING databases (folders of row documents) the tool reads/writes (max 20), found by name or folder name — connect-only; tools never create databases. The user approves access once. The tool code reaches each one with await hillnote.database(name); row ids are the row documents' filenames and setting title renames the row.",
      +  "items": {
      +    "properties": {
      +      "name": {
      +        "description": "Database name (or folder name) — also what the tool passes to hillnote.database()",
      +        "maxLength": 120,
      +        "type": "string"
      +      },
      +      "primary": {
      +        "description": "The tool's main data source — hillnote.data() reads it (at most one sheet or database; replaces an earlier primary).",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • changedInput schema / properties / files / description
      Previous value: -"Array of files to create for this tool"New value: +"Files to create. Prefer a single self-contained index.html (all CSS/JS inline); sibling files (style.css, app.js, modules, extra pages) in the tool folder also load."
    • changedInput schema / properties / files / items / properties / content / description
      Previous value: -"Content of the file while keeping the HTML mobile-optimized"New value: +"File content — tool-specific markup, CSS, and JS only; the design-system baseline is injected automatically"
    • changedInput schema / properties / files / items / properties / filename / description
      Previous value: -"Name of the file (e.g., index.html, styles.css)"New value: +"Name of the file (e.g., index.html)"
    • addedInput schema / properties / glyph
      Added value: +{
      +  "description": "Emoji glyph for the tool tile (e.g. \"📊\", \"🎨\")",
      +  "type": "string"
      +}
    • addedInput schema / properties / sheets
      Added value: +{
      +  "description": "Sheets the tool stores its records in (max 20). With columns: creates a NEW sheet at documents/Tools/<name>, owned by this tool. Name only: connects an EXISTING sheet found by its name or folder name — the user approves access once. The tool code reaches each one with await hillnote.sheet(name). Everything is validated before anything is written.",
      +  "items": {
      +    "properties": {
      +      "columns": {
      +        "description": "Columns for a NEW sheet, in order — the first is the row title. e.g. [{ \"name\": \"Item\" }, { \"name\": \"Amount\", \"type\": \"number\" }, { \"name\": \"Date\", \"type\": \"date\" }]. Column names must be distinct. Omit to connect an existing sheet by name.",
      +        "items": {
      +          "properties": {
      +            "name": {
      +              "description": "Column display name",
      +              "type": "string"
      +            },
      +            "options": {
      +              "description": "Options for select/multiselect/status columns — strings, each shown as a coloured chip (values used later are added automatically)",
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "type": {
      +              "description": "text, number, select, multiselect, status, date, datetime, checkbox, url, email, location, image (default text) — ignored for the first (title) column",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "name"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 200,
      +        "type": "array"
      +      },
      +      "name": {
      +        "description": "Sheet name — also the name the tool passes to hillnote.sheet()",
      +        "maxLength": 120,
      +        "type": "string"
      +      },
      +      "primary": {
      +        "description": "The tool's main data source — hillnote.data() reads it (at most one sheet or database; replaces an earlier primary).",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
  2. First observedv0.6.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that a design-system baseline is auto-injected at save, that existing sheets require one-time user approval, that validation runs before anything is written, and that browser storage APIs do not persist in the sandbox. It omits what happens on a tool-name collision or whether creation is reversible/overwritable.

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?

Purpose and the guide prerequisite are front-loaded in the first two sentences, and there is no filler. However, several sentences drift into runtime API tutorial material (hillnote.sheet/database/settings usage) that reads as documentation for the generated code rather than invocation guidance for this call.

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

Completeness5/5

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

For an 8-parameter creation tool with no output schema, the description covers what the result contains (a validation summary and each sheet's column ids) and explicitly tells the agent not to read files back when validation.issues is empty. Nothing needed to call it correctly appears to be missing.

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 does add runtime meaning the schema cannot express — that primary: true makes hillnote.data() read that source and that result rows should be keyed by column id — but most of its parameter talk restates schema-documented behavior for sheets, databases, and files.

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?

"Create a new HTML tool in the workspace resources/html directory" gives a specific verb, resource, and destination folder, which separates it from edit_html_tool and get_html_tool by the word "new". It stops short of naming the sibling to use for modifying an existing tool, so differentiation is implied rather than stated.

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?

It states an explicit prerequisite ordering ("Call get_html_tool_guide first") and gives conditional guidance for the sheets parameter (columns = create new, name only = connect existing). It does not spell out when to prefer add_tool_view or edit_html_tool instead, so the alternative-selection guidance is incomplete.

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