medical-codes-mcp-server
medcode_browse_hierarchyWalk a US medical code system's hierarchy for discovery without a search term. With no node, returns the top-level entries (ICD-10-CM categories, HCPCS range buckets, or ICD-10-PCS first-axis values). With a node, returns its immediate children. ICD-10-CM and HCPCS use a prefix hierarchy (a shorter code is the parent of a longer one); ICD-10-PCS is axis-based — each of its 7 characters is an independent axis (section, body system, root operation, body part, approach, device, qualifier), but only the top-level Section axis is browsable (omit node): positions 2–7 are context-dependent on the preceding axis path and are not enumerable from a flat partial code. Lets an agent orient in an unfamiliar system or enumerate a category's specific codes. A large child set paginates: when the response carries a nextCursor, pass it back as cursor to fetch the next page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | No | A node to expand — or omit / pass an empty string for the top level. For ICD-10-CM/HCPCS, a code whose children to list; ICD-10-PCS supports only top-level Section browsing. Must not be blank or whitespace-only when provided. | |
| limit | No | Max entries per page. Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. | |
| cursor | No | Opaque continuation token from a previous response's `nextCursor`, to fetch the next page of children/entries. Omit for the top of the list. | |
| system | Yes | The code system to browse. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The page size that was applied. | |
| axes | No | The top-level ICD-10-PCS Section axis values (only the Section axis is enumerable). Empty when kind is "codes". | |
| kind | No | "codes" for prefix-hierarchy children (ICD-10-CM/HCPCS); "axes" for ICD-10-PCS axis values. | |
| codes | No | Child codes under the requested node or top level. Empty when kind is "axes". | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of entries returned on this page (codes or axes). | |
| notice | No | Guidance when a node has no children/axes — suggests the top level or a valid node. | |
| truncated | No | True when more entries exist beyond this page. | |
| nextCursor | No | Opaque token to pass back as `cursor` for the next page. Present only when more entries exist beyond this page. |