Skip to main content
Glama

append_to_array

Append a literal value to an array or list in JSON, YAML, TOML, or Python files. Use to add items such as dependencies, keywords, or include paths.

Instructions

Append a literal value to an array/list. Works for JSON arrays, YAML sequences, TOML arrays, AND Python module-level list literals.

For JSON/YAML/TOML: target is the dotted path to the array. For Python (.py): target is the module-level variable name (e.g. 'ITEMS').

Use this when: You want to add an item to a list (dependencies, keywords, include paths, fixtures, etc.). Don't use this when: You're adding a key-value pair -> use add_key.

Example (TOML): target="project.dependencies" value='"new-package"' Example (Python): target="ITEMS" value='"new-item"'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
targetYes
valueYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It explains behavior for different file types (JSON/YAML/TOML vs Python), target format (dotted path vs variable name), and value formatting (with quoting examples). However, it does not mention error handling (e.g., what if target path does not exist) or whether the operation is idempotent. Still, the provided details go well beyond a generic statement.

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?

The description is concise and well-structured: a one-line purpose, then file-specific notes, usage guidance, and examples. Every sentence adds value, and there is no redundancy. The examples are placed at the end without bloating the core message.

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?

Output schema exists, so return values need not be described. The description covers input semantics well for the given complexity (multiple file types). However, it omits details like error scenarios or whether appending to a non-existent array creates it. Given the good annotations from siblings, it is still fairly complete for a mutation 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?

Input schema has 3 parameters with 0% description coverage in the schema. The description adds meaning for 'target' (explains dotted path vs variable name) and 'value' (literal string with quoting examples). 'file_path' is not elaborated, but its purpose is obvious. The description partially compensates for the missing schema descriptions.

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 clearly states the tool appends a literal value to an array/list, specifies file types (JSON, YAML, TOML, Python), and distinguishes itself from the sibling tool 'add_key' by explicitly saying not to use it for key-value pairs. The verb 'append' plus resource 'array/list' is specific and unambiguous.

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?

Provides explicit when-to-use and when-not-to-use guidance: 'Use this when: You want to add an item to a list... Don't use this when: You're adding a key-value pair -> use add_key.' This clearly sets the context and points to an alternative, making it easy for an agent to decide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kambleakash0/agent-skills'

If you have feedback or need assistance with the MCP directory API, please join our Discord server