Skip to content

Tools overview

Text tools document model-requested limits and model-reported fields; mapping tools clarify identity traversal and evaluation inputs.

MCP mapping tools provide parameter guidance, concise candidate-channel counts and a recovery hint for missing vocabulary codes.

The MCP surface is organized by the job a caller is trying to do. Core vocabulary and graph tools require the CDM runtime. Embedding, chat, and knowledge-pack tools appear when their prerequisites are available.

Choose a workflow

Need Start with What it gives you
Inspect a known concept or relationship Concept tools Deterministic concept records, hierarchy, paths, edges, and standard mappings
Search with a specific retrieval signal Search tools or embedding tools Candidate records plus the signal used to retrieve them
Resolve free text with a ranked policy concept_ground First successful resolver tier, ranked results, and grounding explanation
Resolve an answer within its question's list concept_ground with question_concept_id A lexical match or eligible answers for review
Preserve evidence for mapping review Mapping tools A candidate union, standard targets, hierarchy, relationships, and evaluation helpers
Prepare noisy clinical text Text tools Normalized, decomposed, cleaned, or disambiguated search phrases
Classify structured fields domain_classify Best-effort OMOP domain hints for later retrieval
Analyze a source artifact before ingest Source planning tools Neutral tables, column roles, route decisions, warnings, and provenance
Find the conventions that apply to a mapping job Knowledge tools General mapping guidance and configured instrument or deployment conventions
Check what this deployment can do System tools and --describe Backend availability, vocabulary catalogue, and registered MCP surfaces

Tool groups

Group Tools Availability
Concept concept_get, concept_by_code, concept_ancestors, concept_descendants, concept_relationships, concept_equivalency_path, concept_path, concept_neighbors, concept_associations, concept_extended_inheritance, concept_map_to_standard CDM and graph runtime
Resolver concept_ground Graph runtime
Search concept_search_exact, concept_search_fulltext, concept_navigate_to_standard CDM vocabulary runtime
Mapping concept_search_normalized, concept_candidate_bundle, concept_nearest_standard_ancestor, concept_shared_standard_ancestor, concept_mapping_context, concept_map_to_value, concept_resolve_mapping_expression, mapping_evaluate_candidates CDM runtime; some operations also require graph or embeddings
Embedding embedding_index_status, embedding_neighbours, embedding_search, embedding_search_batch, embedding_encode omop_emb configured
Text text_normalize, text_mapping_cleanup, text_decompose, text_disambiguate Chat model configured
Domain domain_classify Chat model configured
Source planning source_plan, source_plan_assisted Source-planning service; assisted path also needs chat
Knowledge knowledge_catalogue, knowledge_pack Bundled or configured packs available
System system_status, system_vocabulary_catalogue Always registered

The source-planning resources source-planning://canonical-headers, source-planning://column-roles, and source-planning://ingestion-strategies are also registered independently of the tool table. Text preprocessing prompts are available through MCP prompt discovery when the server starts.

Toolsets

Tools can belong to several toolsets. groundworkers --describe lists each tool's memberships.

Name Purpose
system Deployment status and vocabulary catalogue; always registered.
lookup Fetch a concept by id or by vocabulary code.
search Find candidate concepts for text.
mapping Source-to-standard mapping workflow: candidates, mapping context, hierarchy checks, standard targets.
mapping_advanced Less common mapping utilities: mapping by vocabulary code, value mapping, mapping expressions, shared standard ancestors.
graph Concept hierarchy, relationships and paths.
embedding Embedding index search and neighbours.
llm Language-model text helpers.
source Source-file planning.
knowledge Convention packs.
offline Evaluation and diagnostics, not intended for agents.

Usage instructions follow the available tools. Selection can exclude toolsets; exclusion wins when a tool also belongs to an included toolset.

MCP, REST, and Python

MCP is the broad, discovery-oriented surface. REST intentionally exposes only curated workflow operations: candidate bundles and assisted source planning, plus /healthz. Direct Python callers should use app.services.* for domain workflows and should not import MCP tool modules to avoid a transport-shaped API.

See the integration guide for the three entry points and the concepts guide for when to use each one.

Availability and errors

The MCP initialize response includes usage instructions assembled from the final registered tool names, including plugin registrations. Each section is sent only when every Groundworkers tool it names is available; partial deployments can omit the mapping section. Stdio, SSE and streamable HTTP use the same selection. groundworkers --describe reports their presence, character count and included sections. The section text and declared tool dependencies live in src/groundworkers/server_instructions.py.

system_status and system_vocabulary_catalogue are always registered so a client can inspect the deployment before assuming optional capabilities exist. Other tool groups are omitted when their backing runtime is not configured. Use groundworkers --describe to inspect the exact active surface.

MCP tools return a JSON-safe error object rather than raising across the transport boundary:

{"error": true, "code": "ERROR_CODE", "message": "Human-readable description"}

Common codes are NOT_FOUND, INVALID_INPUT, BACKEND_UNAVAIL, QUERY_ERROR, and INTERNAL_ERROR. Direct Python services raise GroundworkersError or ValueError instead; REST maps the same categories to HTTP responses.