Skip to main content
Glama

attach_tool_database

Connects an existing database to an existing HTML tool so it can read and write rows, updating tool.meta.json and returning the database path and column IDs.

Instructions

Connect an EXISTING database (a folder of row documents with database.json) to an EXISTING HTML tool so it can read/write rows with await hillnote.database(name) -> rows()/add()/update()/remove()/onChange(). The user approves access once, in the app. Row ids are the row documents' filenames; setting title renames the row. Updates the tool's tool.meta.json (every other field kept; an entry with the same name is replaced). Returns the database path and its column ids.

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>",
      "database": "<database>"
    },
    "name": "attach_tool_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
categoryNoOptional category where the tool is located
databaseYesThe database to connect
toolNameNoThe tool's folder name under resources/html/
toolPathNoAlternative to toolName: the tool folder or its entry file, relative to the workspace root
workspacePathYesAbsolute path to the workspace directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.19.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations to lean on, the description carries the full burden and does so: it discloses the write target (tool.meta.json), the merge semantics ('every other field kept; an entry with the same name is replaced'), the one-time in-app approval requirement, and the row-identity rule (ids are filenames, setting title renames). It even names the return payload ('database path and its column ids'), which is notable given there is no output schema.

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?

Front-loaded with the purpose before any mechanics, and the parenthetical snippets are dense but functional. It runs long with stacked clauses and parenthetical asides, but no sentence is pure filler.

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?

Covers prerequisites, destructive/merge behavior, and the return shape for a 5-parameter tool with a nested object and no output schema, which is close to complete. The remaining ambiguity is the approval step: it is unclear whether approval happens interactively during the call or must pre-exist, which affects how an agent should sequence the 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% and the nested database object documents name and primary itself, so the baseline is 3. The description adds one genuinely useful clarification — that the database name is exactly the string passed to hillnote.database() — but says nothing extra about workspacePath, toolName, toolPath, or category.

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?

States a specific verb and both resources: 'Connect an EXISTING database ... to an EXISTING HTML tool'. The capitalization of EXISTING and the parenthetical '(a folder of row documents with database.json)' pin down exactly which object is being wired to which, distinguishing it from the sheet-attachment sibling without needing to name it.

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 is implied by the 'EXISTING' emphasis and by the requirement that the user approve access in the app, so an agent can infer this is not the creation path. However, no alternative is named and no exclusion is stated — nothing tells the agent to use create_database for a missing database or attach_tool_sheet for a sheet, which is the most likely misselection here.

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