Skip to main content
Glama

add_field

Add a field, attribute, or member variable at the top of a class body, ensuring fields appear before methods.

Instructions

Add a field/attribute/member at the top of a class body (fields-before-methods convention).

Use this when: You're adding a class attribute (Python), class field (JS/TS), or member variable (C++). Don't use this when: You're adding a method -> use add_method.

Example: class_target="LRUCache" content=' version = "1.0"'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
class_targetYes
contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must fully disclose behavior. It mentions placement convention (top of class body, fields-before-methods), but does not specify whether it checks for duplicates, permissions, or side effects. Some behavioral context is given, but not comprehensive.

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, with a clear verb+resource structure, a usage guideline, and a concrete example. Every sentence serves a purpose, and the information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low schema coverage and absence of annotations, the description should compensate more. It provides good purpose and usage but leaves file_path unexplained. The output schema exists but is not referenced. The tool is simple, so basic usage is clear, but completeness is moderate.

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

Parameters2/5

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

The input schema has three parameters with 0% description coverage. The description only provides an example that explains class_target and content implicitly, but does not describe file_path at all. The example adds some meaning for two parameters, but the missing explanation for file_path leaves a significant gap.

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 it adds a field/attribute/member at the top of a class body, with specific language for Python, JS/TS, and C++. It distinguishes itself from add_method, making the purpose unmistakable.

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 states when to use (adding class attributes, fields, or member variables) and when not to use (adding methods), directing to add_method as an alternative. This provides clear guidance on tool selection.

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