Skip to main content
Glama

add_function_local_variable

Add a variable scoped to a single Blueprint function graph so scratch state stays hidden from other graphs instead of becoming a class member.

Instructions

Add a variable scoped to ONE function graph (interface-override graphs included), instead of a class member like add_blueprint_variable -- use it for scratch state that no other graph should see. Reach it from the graph with add_graph_node node_type=variable_get/variable_set and scope="local" (the default scope="auto" already prefers a local over a member of the same name).

Returns: { blueprint_name, function_name, variable_name, variable_type } -- an echo of the request; local variables do NOT appear in get_blueprint_variables (which lists members), so verify from the graph itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
default_valueNoInitial default value for the local variable, in exported-text form; optional
function_nameYesName of an existing function graph (FunctionGraphs or an interface-override graph)
variable_nameYesVariable name; the call fails if the name already exists in that function
variable_typeYesType string: bool, int, int64, float, string, name, text, byte, Vector, or a struct/enum/class/object name or path
blueprint_nameNoBlueprint asset name or path
blueprint_pathNoAlias of `blueprint_name` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `blueprint_name`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare the safety profile (not read-only, not destructive, not idempotent), so the bar is lower. The description still adds genuinely useful behavior: local variables are invisible to get_blueprint_variables (which lists members), so verification must happen from the graph itself. That is non-obvious and not derivable from the annotations or schema. It does not restate the non-idempotency or the name-collision failure (the latter is covered by the 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 core verb-resource-scope statement, then the sibling contrast, then the access path, then the return/verification note. Dense with parentheticals and a long final sentence, but every clause carries information an agent needs; 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 mutating, non-idempotent graph tool with no output schema, the description supplies the return shape, the visibility gotcha, the scope-resolution rule, and the alternative tool. An agent has enough to call it and to verify the result correctly.

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?

Schema description coverage is 100%, so the baseline is 3. The description improves on it by clarifying the scope semantics of the created variable (local vs member, interface-override graphs included) and how get/set nodes resolve that scope — meaning the schema's bare 'Variable name' entry doesn't fully convey.

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 ('Add a variable scoped to ONE function graph') and immediately separates it from the sibling add_blueprint_variable by contrasting function-scoped vs class-member scope. An agent can pick this tool over the sibling without opening any schema.

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?

Explicitly says when to use it ('scratch state that no other graph should see') and names the alternative (add_blueprint_variable for members). It even gives the downstream consumption path — add_graph_node with node_type=variable_get/variable_set and scope="local" — plus the note that default scope="auto" already prefers locals, which removes ambiguity about how the variable will be resolved.

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