Skip to main content
Glama

hachidori_save_userscript

Creates or patches one userscript while preserving other scripts and their order; omit id to add, or reuse an id to edit or toggle. JavaScript is syntax-checked without execution.

Instructions

Create or patch one userscript, preserving others and its position. Omit id for a new script (provide name); reuse an existing id to edit or toggle. JavaScript is syntax-checked without execution. Read the guide first. Reload pages to run changed JavaScript.

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": {
      "baseRevision": "<baseRevision>"
    },
    "name": "hachidori_save_userscript"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
cssNo
nameNo
enabledNo
javascriptNo
baseRevisionYesRevision from the latest get_settings; conflicts require reading again.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare non-readOnly, non-destructive and non-idempotent, and the description stays consistent with them while adding real context: other scripts and ordering are preserved, JavaScript is syntax-checked but not executed, and pages must be reloaded to run changed code. The only gap is what the call returns (e.g., a new revision or id).

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?

Five short sentences, front-loaded with the create/patch distinction and the id rule, then safety and workflow notes. Nothing is redundant, though the phrasing is clipped enough that 'Read the guide first' relies on the reader mapping 'guide' to the sibling tool.

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?

For a mutating tool with no output schema, the description covers mode selection, preservation semantics, syntax-checking, and the reload workflow, and the schema itself documents the baseRevision conflict rule. What an agent still lacks is the response shape (new revision/id) after a save.

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 coverage is only 17% (just baseRevision is documented), so the description carries most of the burden. It clarifies id (omit = create, reuse = edit/toggle), name (required for new scripts), and javascript (syntax-checked, not run), but says nothing about css or enabled, leaving two of six parameters uninterpreted.

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 opens with a concrete verb pair and resource ('Create or patch one userscript') and immediately states scope ('preserving others and its position'), which separates it from delete/list siblings. It also names the prerequisite guide tool, so an agent can identify it without opening the schema.

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 explicitly describes both operating modes: 'Omit id for a new script (provide name); reuse an existing id to edit or toggle,' plus 'Read the guide first.' It does not name when to prefer a sibling such as delete or list, but the create/patch branching is fully specified.

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