Skip to main content
Glama

set_hooks

Destructive

Offer several opening-line hook options for a session, replace earlier choices, and let the app place the selected hook in the script’s first paragraph for recording.

Instructions

Offer several hooks (opening lines) for a session. Replaces earlier hook options. The app shows them above the teleprompter; picking one puts it in the script's first paragraph (the hook slot), and each take records which hook it opened with (take field 'hook'). Write script.md with your best hook as its own first paragraph. Use this for hook options; use variants for different whole scripts.

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": {
      "session": "<session>",
      "hooks": "<hooks>"
    },
    "name": "set_hooks"
  }
}

Input Schema

NameRequiredDescriptionDefault
hooksYesThe hook options, best first: [{text, note}].
sessionYesSession: 'Project/folder', an absolute path or its id (from get_session). Old paths still work.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2026.11.11
    • changedInput schema / properties / session / description
      Previous value: -"Session as 'Project/folder', an absolute path, or its id (from get_session). An old path still works after a rename or move."New value: +"Session: 'Project/folder', an absolute path or its id (from get_session). Old paths still work."
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare destructiveHint=true, and the description earns that by explaining what is destroyed — earlier hook options are replaced. It also documents downstream effects (hooks appear above the teleprompter, selection populates the script's first paragraph, each take records its hook), which the annotations cannot convey. Permissions/error behavior are not addressed.

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?

The purpose and replacement semantics are front-loaded, and each clause carries information. The middle sentence runs long with stacked clauses (teleprompter, hook slot, take field), which slightly hurts scanability but nothing is filler.

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 a two-parameter mutation with no output schema, the description covers the write semantics, the UI/script workflow and the downstream take linkage — everything an agent needs to call it correctly and predict the effect.

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 100%, so both parameters and the nested text/note fields are already documented. The description adds the domain meaning of a hook (opening line) and how a chosen hook lands in the hook slot, but supplies no extra syntax or constraint detail beyond the schema, so baseline 3 applies.

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 resource: offers hook (opening line) options for a session. It also names the contrasting sibling ("variants" for whole scripts), so an agent can distinguish the two without opening either 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?

Explicitly routes the agent: "Use this for hook options; use variants for different whole scripts." That is a clear use/alternative split, though the alternative is named loosely ("variants") rather than by an exact sibling tool name, and no when-not conditions are given.

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