Skip to main content
Glama

attack

Attack an enemy unit to resolve combat and counter-attack. Both units may take damage or die. Requires attacker in READY or MOVED status and target in range. Use simulate_attack to preview before committing.

Instructions

Mutating. Attack an enemy unit, resolving combat and counter-attack immediately. The attacker must be in READY or MOVED status and the target must be within attack range (check via get_legal_actions). unit_id is your attacking unit; target_id is the enemy unit. Both units may take damage; either may die. After attacking, the unit's status becomes DONE for this turn. Use simulate_attack first to preview the outcome without committing. Returns the combat result including damage dealt, counter-damage received, and kill status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connection_idYes
unit_idYes
target_idYes
Behavior5/5

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

Discloses mutating nature, both units may take damage, may die, unit status becomes DONE. Since no annotations are provided, the description carries full burden and covers combat effects and result details (damage dealt, counter-damage, kill status).

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?

The description is slightly long but front-loaded with the key action. It includes necessary details without being overly verbose. Minor redundancy could be trimmed.

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?

Given the complexity of combat resolution and lack of output schema, the description fully covers prerequisites, effects, return value, and suggests using get_legal_actions for range checking. Complete for effective tool usage.

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?

With 0% schema description coverage, the description explains unit_id and target_id roles. connection_id is not explicitly described but is standard for context. Overall, it compensates well 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 'Attack an enemy unit, resolving combat and counter-attack immediately.' It includes specific verbs and resource, and distinguishes from sibling tools like simulate_attack (preview without committing) and get_legal_actions (range checking).

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 states when to use: attacker must be in READY or MOVED status, target within attack range (check via get_legal_actions). Recommends using simulate_attack first to preview outcome, providing clear before-use guidance.

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/haoyifan/Silicon-Pantheon'

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