Skip to main content
Glama

manage_condition

Track and modify D&D 5e conditions on characters during gameplay, including adding, removing, querying status, and managing durations for streamlined combat management.

Instructions

Manage D&D 5e conditions on targets (add, remove, query, tick duration)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetIdNo
encounterIdNo
operationNo
conditionNo
sourceNo
descriptionNo
durationNo
saveDCNo
saveAbilityNo
exhaustionLevelsNo
roundNumberNo
batchNo

Implementation Reference

  • Registration of the manage_condition tool, including name, description, input schema conversion from Zod schema, and a validating handler that delegates to the manageCondition function.
    manage_condition: {
      name: 'manage_condition',
      description: 'Manage D&D 5e conditions on targets (add, remove, query, tick duration)',
      inputSchema: toJsonSchema(manageConditionSchema),
      handler: async (args) => {
        try {
          const validated = manageConditionSchema.parse(args);
          const result = manageCondition(validated);
          return success(result);
        } catch (err) {
          if (err instanceof z.ZodError) {
            const messages = err.errors.map(e => `${e.path.join('.')}: ${e.message}`).join(', ');
            return error(`Validation failed: ${messages}`);
          }
          const message = err instanceof Error ? err.message : String(err);
          return error(message);
        }
      },
    },
  • The tool handler function which performs Zod validation on input arguments and executes the core manageCondition logic, returning success or formatted error.
    handler: async (args) => {
      try {
        const validated = manageConditionSchema.parse(args);
        const result = manageCondition(validated);
        return success(result);
      } catch (err) {
        if (err instanceof z.ZodError) {
          const messages = err.errors.map(e => `${e.path.join('.')}: ${e.message}`).join(', ');
          return error(`Validation failed: ${messages}`);
        }
        const message = err instanceof Error ? err.message : String(err);
        return error(message);
      }
  • Import statement bringing in the manageConditionSchema (Zod schema for input validation) and manageCondition (core handler function) from the combat module.
    import { manageCondition, manageConditionSchema, createEncounter, createEncounterSchema, executeAction, executeActionSchema, advanceTurn, advanceTurnSchema, rollDeathSave, rollDeathSaveSchema, modifyTerrain, modifyTerrainSchema, renderBattlefield, renderBattlefieldSchema, getEncounter, getEncounterSchema, endEncounter, endEncounterSchema, manageEncounter, manageEncounterSchema } from './modules/combat.js';
  • Delegation to the core manageCondition helper function after schema validation. The actual condition management logic resides here.
    const validated = manageConditionSchema.parse(args);
    const result = manageCondition(validated);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions operations (add, remove, query, tick duration) but lacks critical details: whether this is a read/write operation, permission requirements, side effects (e.g., does 'tick duration' automatically remove expired conditions?), or error handling. The description is too vague for a tool with 12 parameters and complex functionality.

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 extremely concise—a single, efficient sentence that front-loads the core purpose. Every word earns its place by specifying the domain (D&D 5e), resource (conditions on targets), and key operations. No wasted verbiage or redundancy.

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

Completeness2/5

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

Given the tool's complexity (12 parameters, no schema descriptions, no output schema, no annotations), the description is inadequate. It doesn't cover parameter meanings, behavioral traits, output format, or usage context. For a multi-operation tool with batch capabilities and nuanced duration handling, this leaves too many gaps for effective agent use.

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?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It only mentions 'targets' and operations, but doesn't explain any of the 12 parameters (e.g., targetId, operation types, condition types, duration formats, batch usage). This leaves most parameter meanings ambiguous, failing to add value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: managing D&D 5e conditions on targets with specific operations (add, remove, query, tick duration). It uses specific verbs and identifies the resource (conditions on targets), but doesn't explicitly differentiate from sibling tools like manage_aura or manage_concentration, which might handle related but distinct mechanics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It lists operations but doesn't specify contexts, prerequisites, or exclusions. For example, it doesn't clarify when to use manage_condition versus manage_aura for overlapping effects, or whether it's for combat-only scenarios.

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/Mnehmos/ChatRPG'

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