Skip to content

MCP tools

The MCP server is created with FastMCP under the name dicom-standard-kb and runs over stdio.

Terminal window
EDITION=2025e # Replace with your concrete edition.
dicom-kb mcp serve \
--edition "$EDITION" \
--db /absolute/path/to/database.sqlite

Server-level options:

Option Required/default Meaning
--edition required unless profile/environment supplies it Concrete edition applied to every tool call.
--db <cache>/db/<edition>.sqlite Local SQLite knowledge base.
--cache-dir default cache Used to resolve the conventional database path.

The edition is fixed when the process starts. Individual MCP tools do not accept an edition argument.

The database is opened through a read-only SQLite URI for each tool execution.

The reviewed adapter registers exactly 19 tools and no MCP resources or prompts.

Tool Arguments Purpose
dicom_lookup_data_element tag_or_keyword: string Look up a PS3.6 data element by tag, range tag, or keyword.
dicom_lookup_uid uid_or_keyword: string Look up a PS3.6 UID registry entry by UID value or keyword.
dicom_lookup_sop_class uid_or_name_or_keyword: string Look up a PS3.4 SOP Class and linked IOD records.
dicom_lookup_iod iod_name: string Look up a PS3.3 IOD by name or keyword.
Tool Arguments Purpose
dicom_lookup_enumerated_values attribute: string, context?: string Look up parsed enumerated values, optionally narrowed by context.
dicom_lookup_defined_terms attribute: string, context?: string Look up parsed defined terms, optionally narrowed by context.
dicom_list_modules_for_iod iod_name: string List PS3.3 module-use rows for an IOD.
dicom_list_attributes_for_module module_name: string, expand_macros: boolean = false List PS3.3 attribute and include rows for a module.
dicom_resolve_attribute_context attribute: string, iod_name?: string, sop_class?: string Resolve applicable attribute uses and bounded effective type.
Tool Arguments Purpose
dicom_lookup_vr vr: string Look up a PS3.5 Value Representation definition.
dicom_lookup_transfer_syntax uid_or_keyword: string Look up a Transfer Syntax and linked encoding details.
dicom_explain_encoding_rule topic: string Return a bounded, cited PS3.5 encoding explanation.
Tool Arguments Purpose
dicom_lookup_media_type media_type_or_context: string Look up parsed media-type constraints by media type or service context.
dicom_lookup_dicomweb_transaction name_or_route: string Look up a PS3.18 transaction by name or route template.
Tool Arguments Purpose
dicom_lookup_sr_template tid_or_name: string Look up a PS3.16 SR template by TID or exact name.
dicom_lookup_context_group cid_or_name: string Look up a PS3.16 context group by CID or exact name.
dicom_lookup_code_meaning code_value: string, scheme?: string Look up a coded concept by code value and optional coding scheme.
Tool Arguments Purpose
dicom_retrieve_standard_text part: string, section_or_anchor: string, max_chars: integer = 800 Retrieve a bounded excerpt from persisted standard text.
dicom_search_standard_text query: string, part_filter?: string, limit: integer = 10 Search persisted standard text.

Every tool returns the public JSON response envelope.

The MCP name retains the dicom_ namespace, while the response’s tool field uses the underlying resolver name, such as:

{
"tool": "lookup_data_element"
}

Do not use the MCP function name as a substitute for inspecting the returned field.

  • ok: a result is present.
  • not_found: no matching parsed fact was found.
  • validation_error: deterministic input validation failed.

These remain successful MCP tool executions with structured response status. Unknown MCP tool names are rejected before resolver dispatch.

The server fails before entering the stdio loop when:

  • the configured SQLite file does not exist;
  • the optional mcp dependency is missing;
  • an edition or path option is invalid.

The missing-database message points to the official fetch/build flow, the offline fixture flow, and the explicit --db option.

Treat the server as a read-only, deterministic evidence provider. The client or agent harness should:

  1. discover tools instead of hard-coding an incomplete subset;
  2. choose a structured tool before text search;
  3. pass exact identifiers and context;
  4. retain the entire response;
  5. surface candidates, warnings, and null fields;
  6. cite returned references;
  7. never reinterpret not_found as permission to answer from model memory.