Skip to main content
Glama

bundleShader

Inlines only the shader library symbols a program uses and their dependencies, with upstream and technique credits; returns source and writes back only when write:true is set.

Instructions

Inline only the shader library symbols used by a program and their dependencies, with upstream and technique credits. Return source; write back only with explicit write: true.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "bundleShader"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoExisting shader file inside SHADE_EFFECTS_DIR or SHADE_PROJECT_ROOT. Relative paths use the project root.
writeNoWrite the bundled source back to file only when explicitly true. Requires file input.
sourceNoShader source text. Provide exactly one of source or file.
languageNoRequired for source text; otherwise inferred from .wgsl, .glsl, .frag or .vert.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.4

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It usefully discloses the safe default (return source, do not modify the file) and that upstream/technique credits are included in the result, but it repeats the write semantics already present in the schema and says nothing about what happens on write-back (overwriting the original file), path/auth failure modes, or whether the operation is reversible.

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

Conciseness5/5

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

Two short sentences, with the core operation and the 'only used symbols + dependencies' scope front-loaded and the write caveat placed last where it belongs. Nothing is wasted.

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?

There is no output schema, and the description does tell the agent what comes back (source plus credits), while all four parameters are fully documented in the schema. The one material gap for a tool with a write mode is the absence of any statement about overwriting the target file on write-back.

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 description coverage is 100%, so file, source, write, and language are all already explained, including the exactly-one-of source/file and language inference rules. The description adds no parameter-level meaning beyond the schema, so the 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?

The description states a specific verb ('Inline') plus a precise resource ('only the shader library symbols used by a program and their dependencies'), which is enough to distinguish it from siblings like searchShaderLibrary or checkShader, whose names imply lookup or validation rather than bundling.

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?

'Return source; write back only with explicit write: true' gives a concrete condition for the mutating mode and implies the default call is a read. It does not name an alternative tool or state when bundling is preferable to, say, compiling the effect, so it stops short of explicit routing guidance.

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