Skip to main content
Glama
Yan-Vi
by Yan-Vi

set_util_body

Sets or updates the body of a shared utility function, creating it if needed, so all call sites use the new implementation.

Instructions

Set a shared utility function's body -- plain TypeScript statements, no wrapping async function (...) { } (that's generated automatically from this body + the function's own params, see set_util_params). Creates the util on first use if name doesn't exist yet (landing in "custom-utils" -- move it afterward with set_util_group_name if needed). A step names this function via kind: <its groupName>, method: name (see add_step) instead of inlining code -- every step naming the same util calls this one shared function, so editing it here updates every call site at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
nameYes
projectNoPath to the project root (same folder the side panel connects to). Defaults to the EASYSPEC_PROJECT environment variable if omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of explaining side effects. It does disclose that the util is created on first use, that edits update every call site, and that the body should not include the async function wrapper. It does not mention error conditions or whether an existing body is overwritten, but the core behavior is clear.

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 description is somewhat dense but each sentence earns its place: it defines the body format, the first-use creation behavior, the optional group move, and the relationship to step call sites. It is longer than strictly necessary but not padded or redundant.

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?

Given the simple input schema and lack of output schema, the description provides enough context about the tool's effect and its place in the broader system. It explains how the utility is referenced by steps and how the update propagates, which is sufficient for correct invocation. It does not discuss return values or failure modes, but those are not critical for this low-complexity tool.

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

Parameters4/5

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

The schema only describes the optional project parameter, so the description adds essential meaning for name and body. It explains that body is plain TypeScript statements with no wrapper, and that name is the shared function identifier tied to first-use creation. It does not specify naming constraints or exact body syntax beyond the wrapper rule.

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 specific verb and resource: 'Set a shared utility function's body'. It clearly distinguishes this from sibling tools like set_util_params by explaining that params are handled separately, and from inline step code by describing the shared-function model.

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

Usage Guidelines5/5

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

The description explicitly explains when to use the tool: to define or update a shared function body, creating the util on first use if needed. It cross-references set_util_params, add_step, and set_util_group_name, giving clear context for related actions and alternatives.

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