Skip to main content
Glama

Search the tModLoader API surface

api_search
Read-only

Search the installed tModLoader API for a type, field, property, or method by name. Returns signatures straight from the assembly metadata, so results always match the exact version in use.

Instructions

Find a type, field, property or method in the INSTALLED tModLoader.

Args: query: Part of a name, or a type. cloudAlpha, rain, QuickSpawnItem, IEntitySource. Case-insensitive. kind: Narrow to one of type, field, property, method. limit: How many matches to return, best first.

ANSWERS THE QUESTION YOU HAVE BEFORE YOU WRITE ANYTHING. A compile tells you exactly whether the call you already wrote is right; it cannot tell you what is there. Main.maxRaining is only findable if you already suspect the name.

READ FROM THE ASSEMBLY'S OWN METADATA, so it cannot drift from the version installed — which is the failure mode of every wiki page and every model's recollection of an API. It carries no prose, because it is not documentation: it is the public surface, with signatures.

The index is built once per tModLoader version and cached against the DLL it came from, so a game update invalidates it by construction rather than by anybody remembering to. The first call after an update pays a few seconds.

Needs a .NET SDK, because the indexer is a small C# tool — it reads metadata without loading or running the game assembly. Without one this refuses and says so, rather than answering from a stale or absent index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
limitNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexedYes
matchesYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.3

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=true, destructiveHint=false), the description reveals that the tool reads from assembly metadata without loading or running the game assembly, builds and caches an index per tModLoader version, invalidates that cache on update, may take a few seconds on first call after an update, and refuses instead of returning stale results when the SDK is missing. These are precise behavioral traits that an agent needs to predict performance and failure modes.

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 front-loaded with the core purpose and has compact argument bullets. The later paragraphs are dense and useful, though the caching/metadata explanation could be trimmed slightly without losing meaning. Overall, almost every sentence earns its place, but the prose is a bit more elaborate than the minimum needed.

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?

The description covers what is searched, how to phrase queries, how results are limited, why it is trustworthy, how caching affects latency, and what external prerequisites exist. Since an output schema is present, the tool's return value details do not need to be described here. Nothing an agent needs to invoke and interpret this tool correctly is missing.

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

Parameters5/5

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

With 0% schema description coverage, the description carries the full burden for parameter meaning.It does so well: query is defined as a case-insensitive name fragment or type with concrete examples, kind is narrowed to type/field/property/method, and limit is described as controlling how many best-first matches are returned. This adds real semantic value beyond the bare schema.

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 first line states the exact resource being searched ('the INSTALLED tModLoader') and the specific entities returned ('type, field, property or method'). The description distinguishes this from a code compiler in the same sentence, making it unmistakably an API-discovery tool rather than a validation or documentation tool.

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 says to use this before writing code, when you need to know what exists rather than whether an existing call compiles. It contrasts with a compile stepcars, notes that it is not a prose documentation source, and states the .NET SDK requirement up front. This gives clear guidance on when to call the tool and what it cannot do.

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