Skip to main content
Glama
Terranslayer

D&D 5e Tool Server

by Terranslayer

semantic_search

Find relevant passages in D&D 5e SRD rules and indexed module text using semantic search. Filter by campaign or ruleset to get sourced snippets, excluding unrelated content.

Instructions

对 SRD 叙事 + 已索引模组散文做语义检索,返回带出处的片段。 campaign/ruleset 为空=不限(含共享规则);给定 campaign 时只召回该战役+共享规则,避免串味。 精确数值仍用 lookup_* 工具。需已建索引(scripts/build_index.py / index_module)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes
rulesetNo
campaignNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Discloses the filtering behavior (empty campaign/ruleset = unlimited, given campaign = that campaign + shared rules) and the requirement of an existing index. Since no annotations are provided, the description carries the full burden; it provides key behavioral info about return format and read-only nature, though explicit read-only declaration is missing but implied.

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?

Three concise sentences, front-loading the main purpose, then clarifying scope and providing alternative and prerequisite. No waste and well structured.

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?

Covers the essential information: what it does, output format, scope filtering, alternative tools, and prerequisite. Lacks explicit error handling and pagination, but sufficient for a search tool given no output schema and simple parameters.

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?

The description explains the semantics of campaign and ruleset parameters explicitly (scope filtering), and implies query is the search text via the main purpose. However, k is not mentioned, and with 0% schema coverage, the description should ideally explain all parameters. It partially compensates but misses k.

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 (semantic search), resource (SRD narrative + indexed module prose), and output (fragments with citations). Explicitly differentiates from lookup_* tools for exact values, which distinguishes it from sibling tools like lookup_rule and lookup_spell.

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: semantic search for narrative/prose, and when not to: exact numeric values should use lookup_* tools. Also clarifies scope filtering (campaign/ruleset behavior) and prerequisite (index must be built).

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