Skip to main content
Glama
tugraskan

swatplus-mcp

by tugraskan

module_variable

Find a SWAT+ module-level variable by name and optional module, returning its declaring module, type, declaration, line, units, and meaning. Resolves duplicate names and falls back to meaning search.

Instructions

A variable declared in a module body -- its declaring module, type, full declaration (so an allocatable array is distinguishable from a scalar), line, units and meaning. This is the program's global state: a state object like aqu_d is a module-level instance, which describe_type cannot confirm exists. Where a bare name is declared in more than one module, every candidate is returned rather than one being chosen. Falls back to a name and documented-meaning search when there is no exact match. Exhaustive, not truncated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesVariable name, e.g. aqu_d
moduleNoOptional declaring module, to disambiguate

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it discloses several non-obvious behaviors: every candidate is returned on name collisions rather than one being chosen, a fallback to name/meaning search occurs on no exact match, and results are exhaustive rather than truncated. No authentication or side-effect context is given, but for a read-only code-analysis lookup this is strong disclosure.

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?

Front-loaded with the core definition of what is returned, followed by behavioral rules. Dense and mostly earning its place, though a couple of sentences are run-on and the parenthetical example is a touch verbose.

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?

No output schema exists, so the description must describe the return shape; it enumerates the fields (module, type, full declaration, line, units, meaning) and notes exhaustiveness. That is sufficient for correct invocation, with only minor gaps around result structure/ordering.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters are already documented (name with an example, module as disambiguator). The description reinforces purpose but adds no syntax or format detail beyond the schema; the multi-module sentence implies the role of the module parameter but doesn't define it. Baseline 3 is appropriate.

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 resource (a module-declared variable) and precisely what is returned: declaring module, type, full declaration, line, units and meaning. It explicitly distinguishes itself from a sibling, noting this covers program global state which 'describe_type cannot confirm exists'. An agent can route to it without opening another schema.

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?

Clear context: use it to find a variable declared in a module body, with an explicit contrast against describe_type as the tool that cannot confirm such existence. It also explains the multi-module return rule and the fuzzy fallback, which guides invocation. It stops short of a full when/when-not routing across all siblings, so not a 5.

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