Skip to main content
Glama

List saved scripts

tool_list
Read-only

List saved scripts or read one by name to inspect its code, helping you check existing tools before writing a new script.

Instructions

List the user's saved scripts (name, description, params), or read one with its code when name is given. Check here before writing a new script. Scripts are small JavaScript tools saved on this computer (folder tools/ next to config.json) so they can be run again later. The script body is an async function: it gets args, call(toolName, args) (runs any print-mcp tool and returns its parsed result), readFile(path) (Buffer; only files named in args or returned by tools), writeFile(name, bufferOrText) (saved in the run's output folder, returns the path), sharp(buffer) for image work (no file paths: pass a Buffer, save with writeFile), log(...), sleep(ms), and toolList / toolUse / toolWrite / toolEdit / toolRemove. return a JSON value. No network, no other file access, no child processes.

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": "tool_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoReturn this one script including its code

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description adds substantial context beyond that — where scripts live on disk, that the body is an async function, the exact runtime surface (args, call, readFile, writeFile, sharp, log, sleep), and the sandbox limits (no network, no other file access, no child processes). That is exactly the kind of environment/constraint disclosure the agent needs and cannot get from the annotation.

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?

The purpose and the write-first routing are front-loaded, which is good. However, the long enumeration of the script runtime API (call, readFile, sharp, sleep, toolList/toolUse/...) reads as reference material that belongs in tool_write or tool_use, and it dilutes a listing tool's definition.

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 one-parameter read-only tool with no output schema, the description covers storage location, both return shapes, and the execution sandbox. An agent can decide whether to call it and interpret the result without further information.

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 coverage is 100% and the single `name` parameter is documented there, so the baseline is 3. The description adds meaning by stating that without `name` the tool enumerates entries with name/description/params, while with `name` it returns the full code — a behavioral distinction the schema alone does not 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 ('List the user's saved scripts') plus the fields returned (name, description, params), and explains the alternate mode when `name` is supplied. This clearly separates it from the sibling mutation tools tool_write/tool_edit/tool_remove and from tool_use.

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?

Gives a concrete pre-condition: 'Check here before writing a new script,' which routes the agent to this tool ahead of tool_write. It also tells the agent that passing `name` switches from listing to reading code. It does not explicitly say when to prefer tool_use or tool_edit over this, so it stops short of full alternative routing.

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