Skip to main content
Glama

set_hda_section_content

Write or update content in a specific HDA definition section, including event scripts, with optional Python or HScript language selection.

Instructions

Write content to a specific section in an HDA definition.

Event scripts (OnCreated, OnLoaded, OnUpdated, OnDeleted, OnInputChanged, PreFirstCreate, PostLastDelete, ...) are HScript unless marked Python: pass language="python" (or "hscript"); left out, code using kwargs, hou. or import is marked Python. script_language reads it back.

Args: ctx: MCP context. node_path: Node path. section_name: Section name. content: Section content. language: For an event script, "python" or "hscript".

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": {
      "node_path": "<node_path>",
      "section_name": "<section_name>",
      "content": "<content>"
    },
    "name": "set_hda_section_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYes
languageNo
node_pathYes
section_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.29.0
    • addedInput schema / properties / language
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Language"
      +}
  2. Changed1 schema field changedv2.24.1
    • addedInput schema / additionalProperties
      Added value: +false
  3. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden and it does disclose one genuine behavioral trait: the auto-detection heuristic that infers Python from kwargs, hou., or import when language is omitted, plus the note that script_language reads the value back. It omits mutation-relevant behavior such as overwrite semantics, whether a missing section is created or errors, and permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in a single clear sentence, and the event-script paragraph is dense but informative. The Args section is padding that restates parameter names without adding information, weakening the otherwise compact structure.

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?

For a 4-parameter mutation tool with no annotations and no output schema, the description covers language handling well but leaves key gaps: no indication of what write returns, whether sections are created on demand, or what happens to prior content. Adequate but not complete for the risk profile of a write tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the Args block is largely tautological — 'node_path: Node path', 'section_name: Section name', 'content: Section content' add nothing beyond the schema. The 'language' entry does add real meaning (valid values and event-script-only scope, with an auto-detect fallback), which lifts this above a pure restatement.

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?

States a specific verb and resource: 'Write content to a specific section in an HDA definition.' That distinguishes it implicitly from its read counterpart get_hda_section_content and from the interface-editing siblings, though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this versus get_hda_section_content, set_hda_interface, or update_hda, and no preconditions such as whether the section must already exist or whether writing replaces existing content. The only conditional logic given ('left out, code using kwargs, hou. or import is marked Python') governs language inference, not tool selection.

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

Deploy Server

Other Tools