Skip to main content
Glama

docs

Read-onlyIdempotent

Reference for the foundry.* API used in query and execute scripts. No arguments: the index — every domain with its methods for this world's game system; 🔒 marks methods above your tier. With domain (e.g. "actors"): the TypeScript declarations of that domain with parameter and result types. With type (e.g. "ActorSummary"): one named type. Read the domain declarations before writing a script; every method takes one object argument and returns a Promise.

Input Schema

NameRequiredDescriptionDefault
typeNoNamed type from a domain declaration, e.g. "ActorSummary"
domainNoDomain name from the index, e.g. "actors", "tokens"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safe read-only, idempotent profile, so the description's job is to add context. It does: the 🔒 marker discloses that some methods sit above the caller's tier (an auth/entitlement constraint absent from annotations), and the closing sentence discloses that every method takes one object argument and returns a Promise — a real behavioral detail for script authors.

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?

Front-loaded with the single purpose, then three crisp mode clauses, then an instruction. It is dense but every sentence earns its place, with no filler.

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?

This tool has no output schema, so the description carries the burden of describing returns, and it does so for all three call modes. The one gap is what happens if both domain and type are supplied and whether type requires a domain; that edge case is left implicit.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds value beyond the schema by explaining how each parameter selects an output mode, including what an empty call returns. It gives example values for both parameters and treats them as mutually exclusive modes, which the schema does not state.

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 verb+resource: a reference lookup for the foundry.* API used in query/execute scripts. It clearly distinguishes itself from its siblings execute and query, which run scripts, while this one documents the API those scripts call.

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?

Gives explicit usage guidance by call mode (no args = index, domain = typed declarations, type = one named type) and directs the agent to 'Read the domain declarations before writing a script,' which establishes the when-to-use context. It does not explicitly say when not to use it, but the routing is clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources