{"id":87804,"plugin_id":"plugin_asdk_app_6aece7f7d7b881919fb25c6fcaaabc21","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-09T18:09:06.058Z","digest":"844763b583fe3a3f42a9e8000b2efa0a533a458cae804443e93776d1084167eb","against":null,"payload":{"description":"Navigate the IMO Knowledge Graph via GraphQL — code mappings, hierarchy traversal, refinements, cross-domain relationships, and reverse lookups across 9 tools","included_files":[],"name":"imo-graphql","skill_md_contents":"---\r\nname: imo-graphql\r\ndescription: Navigate the IMO Knowledge Graph via GraphQL — code mappings, hierarchy traversal, refinements, cross-domain relationships, and reverse lookups across 9 tools\r\nwhen_to_use: Use when the user wants to map codes across systems (ICD-10, SNOMED, CPT, RxNorm, NDC), explore parent/child hierarchies, apply refinements (laterality, chronicity, etc.), find cross-domain relationships (treatments, procedures, causative agents), or do reverse lookups from procedures/medications to problems. Triggers on words like \"map\", \"cross-map\", \"hierarchy\", \"children\", \"parent\", \"refine\", \"laterality\", \"specificity\", \"related problems\", \"treatments for\", \"what procedures\".\r\nuser-invocable: true\r\n---\r\n\r\n# GraphQL Knowledge Graph — 9 Tools\r\n\r\nNavigate the IMO Health Knowledge Graph via GraphQL. This skill covers code mappings, lexical context, refinements, hierarchy traversal, cross-domain relationships, and reverse lookups.\r\n\r\n**Critical:** All tools in this skill require the `lexical_code` from normalization or search results — NOT the `imo_code`. If the user only has a free-text term, chain from `imo-normalize` or `imo-core-search` first.\r\n\r\n---\r\n\r\n## A. Code Mappings\r\n\r\n### 1. `graphql_modifier___get_mappings`\r\n\r\n**When to use:** Use for external coding-system mappings of a known IMO lexical, optionally filtered by system or enriched with Problem-domain HCC information.\r\n\r\n#### Purpose, documented response, and behavior\r\n\r\nRetrieve external code mappings for an IMO lexical from the Knowledge Graph.\r\n\r\nIMPORTANT: Use the 'lexical_code' value from normalize_ppml_term results\r\nas the code parameter (NOT the imo_code). Returns equivalent codes in industry\r\nstandard coding systems, with the available systems depending on the domain:\r\n\r\n- problem: ICD-10-CM, ICD-10-CA, ICD-9-CM, SNOMED CT (International/Canadian/US),\r\n  DSM-5, ICD-O, MONDO. Set include_hcc=True to add HCC data on ICD-10-CM codes\r\n  (a structured 'hcc' array of category/description/model, e.g. CMS_HCC_V28,\r\n  RX_HCC_V08).\r\n- procedure: CPT, HCPCS, ICD-10-PCS, LOINC, SNOMED CT International.\r\n- medication: RxNorm (with term-type titles), NDC (with brand/generic name,\r\n  dosage form, route, labeler, active ingredients, package codes), CVX (with\r\n  vaccine status and MVX manufacturers), SNOMED CT International.\r\n\r\nEach mapping includes the code, title, code system, and relationship type\r\n(exactMatch, closeMatch, broadMatch, narrowMatch, relatedMatch). Optionally\r\nfilter with the code_systems parameter (GraphQL enum values, no quotes).\r\n\r\n#### Input arguments exposed by the connected MCP tool\r\n\r\nHost-visible tool: `mcp__imo_health__graphql_modifier___get_mappings`.\r\n\r\n```typescript\r\ntype Input = {\r\n  // Optional list of code systems to filter by. Depends on domain — problem: icd10cm, icd10ca, icd9cm, snomedInternational, snomedCa, snomedUs, dsm5, icdO, mondo. procedure: cpt, hcpcs, icd10pcs, loinc, snomedInternational. medication: rxnorm, ndc, cvx, snomedInternational. If not provided, returns all code maps for the domain.\r\n  code_systems?: Array<string> | null;\r\n  // The lexical domain: 'problem' (default), 'procedure', or 'medication'. Determines which code systems are available.\r\n  domain?: string;\r\n  // The lexical_code from normalize_medical_term results (e.g. '78845' for knee pain)\r\n  imo_lexical_code: string;\r\n  // Problem domain only. If true, include HCC (Hierarchical Condition Category) data on ICD-10-CM mappings — a structured 'hcc' array with category, description, and model (e.g. CMS_HCC_V28, RX_HCC_V08).\r\n  include_hcc?: boolean;\r\n};\r\n```\r\n\r\n#### Documented input schema (JSON Schema)\r\n\r\n```json\r\n{\r\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n  \"title\": \"graphql_modifier___get_mappings\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"code_systems\": {\r\n      \"type\": [\r\n        \"array\",\r\n        \"null\"\r\n      ],\r\n      \"items\": {\r\n        \"type\": \"string\"\r\n      },\r\n      \"description\": \"Optional list of code systems to filter by. Depends on domain — problem: icd10cm, icd10ca, icd9cm, snomedInternational, snomedCa, snomedUs, dsm5, icdO, mondo. procedure: cpt, hcpcs, icd10pcs, loinc, snomedInternational. medication: rxnorm, ndc, cvx, snomedInternational. If not provided, returns all code maps for the domain.\"\r\n    },\r\n    \"domain\": {\r\n      \"type\": \"string\",\r\n      \"enum\": [\r\n        \"problem\",\r\n        \"procedure\",\r\n        \"medication\"\r\n      ],\r\n      \"default\": \"problem\",\r\n      \"description\": \"The lexical domain: 'problem' (default), 'procedure', or 'medication'. Determines which code systems are available.\"\r\n    },\r\n    \"imo_lexical_code\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical_code from normalize_ppml_term results (e.g. '78845' for knee pain)\"\r\n    },\r\n    \"include_hcc\": {\r\n      \"type\": \"boolean\",\r\n      \"description\": \"Problem domain only. If true, include HCC (Hierarchical Condition Category) data on ICD-10-CM mappings — a structured 'hcc' array with category, description, and model (e.g. CMS_HCC_V28, RX_HCC_V08).\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"imo_lexical_code\"\r\n  ],\r\n  \"allOf\": [\r\n    {\r\n      \"if\": {\r\n        \"properties\": {\r\n          \"domain\": {\r\n            \"const\": \"problem\"\r\n          }\r\n        }\r\n      },\r\n      \"then\": {\r\n        \"properties\": {\r\n          \"code_systems\": {\r\n            \"items\": {\r\n              \"type\": \"string\",\r\n              \"enum\": [\r\n                \"icd10cm\",\r\n                \"icd10ca\",\r\n                \"icd9cm\",\r\n                \"snomedInternational\",\r\n                \"snomedCa\",\r\n                \"snomedUs\",\r\n                \"dsm5\",\r\n                \"icdO\",\r\n                \"mondo\"\r\n              ]\r\n            }\r\n          }\r\n        }\r\n      }\r\n    },\r\n    {\r\n      \"if\": {\r\n        \"properties\": {\r\n          \"domain\": {\r\n            \"const\": \"procedure\"\r\n          }\r\n        },\r\n        \"required\": [\r\n          \"domain\"\r\n        ]\r\n      },\r\n      \"then\": {\r\n        \"properties\": {\r\n          \"code_systems\": {\r\n            \"items\": {\r\n              \"type\": \"string\",\r\n              \"enum\": [\r\n                \"cpt\",\r\n                \"hcpcs\",\r\n                \"icd10pcs\",\r\n                \"loinc\",\r\n                \"snomedInternational\"\r\n              ]\r\n            }\r\n          }\r\n        }\r\n      }\r\n    },\r\n    {\r\n      \"if\": {\r\n        \"properties\": {\r\n          \"domain\": {\r\n            \"const\": \"medication\"\r\n          }\r\n        },\r\n        \"required\": [\r\n          \"domain\"\r\n        ]\r\n      },\r\n      \"then\": {\r\n        \"properties\": {\r\n          \"code_systems\": {\r\n            \"items\": {\r\n              \"type\": \"string\",\r\n              \"enum\": [\r\n                \"rxnorm\",\r\n                \"ndc\",\r\n                \"cvx\",\r\n                \"snomedInternational\"\r\n              ]\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n#### Inputs\r\n\r\n| Parameter | Type | Required | Meaning, default, and constraints |\r\n| --- | --- | --- | --- |\r\n| `code_systems` | `Array<string> \\| null` | No | Optional list of code systems to filter by. Depends on domain — problem: icd10cm, icd10ca, icd9cm, snomedInternational, snomedCa, snomedUs, dsm5, icdO, mondo. procedure: cpt, hcpcs, icd10pcs, loinc, snomedInternational. medication: rxnorm, ndc, cvx, snomedInternational. If not provided, returns all code maps for the domain. |\r\n| `domain` | `string` | No | The lexical domain: 'problem' (default), 'procedure', or 'medication'. Determines which code systems are available. |\r\n| `imo_lexical_code` | `string` | Yes | The lexical_code from normalize_ppml_term results (e.g. '78845' for knee pain) |\r\n| `include_hcc` | `boolean` | No | Problem domain only. If true, include HCC (Hierarchical Condition Category) data on ICD-10-CM mappings — a structured 'hcc' array with category, description, and model (e.g. CMS_HCC_V28, RX_HCC_V08). |\r\n\r\n#### Interpretation and related-tool guidance\r\n\r\nPass `code_systems` as an array of strings, never as a single string. Enum spellings are case-sensitive; `icdO` ends with the letter O. The server constructs GraphQL enum syntax internally: MCP callers still supply strings in the array. Preserve the returned match type; a mapping is not necessarily an exact equivalent.\r\n\r\n---\r\n\r\n## B. Lexical Lookup & Hierarchy\r\n\r\n### 2. `graphql_modifier___get_lexical`\r\n\r\n**When to use:** Use to inspect a lexical's title, parents, already-applied refinements, and available refinement groups.\r\n\r\n#### Purpose, documented response, and behavior\r\n\r\nLook up an IMO lexical in the IMO Health Knowledge Graph by its lexical code.\r\n\r\nIMPORTANT: Use the 'lexical_code' value from normalize_ppml_term results\r\nas the code parameter (NOT the imo_code). Returns the title, broader (parent) concepts,\r\napplied refinements (refinements already reflected in the lexical), and allowed\r\nrefinements grouped by category. Use the allowed refinements to understand what\r\noptions can increase diagnostic specificity.\r\nNote: appliedRefinements and allowedRefinements are only available for the 'problem' domain.\r\n\r\n#### Input arguments exposed by the connected MCP tool\r\n\r\nHost-visible tool: `mcp__imo_health__graphql_modifier___get_lexical`.\r\n\r\n```typescript\r\ntype Input = {\r\n  // The lexical domain (e.g. 'problem', 'procedure', 'medication')\r\n  domain?: string;\r\n  // The lexical_code from normalize_medical_term results (e.g. '85191')\r\n  imo_lexical_code: string;\r\n};\r\n```\r\n\r\n#### Documented input schema (JSON Schema)\r\n\r\n```json\r\n{\r\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n  \"title\": \"graphql_modifier___get_lexical\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"domain\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical domain (e.g. 'problem', 'procedure', 'medication')\"\r\n    },\r\n    \"imo_lexical_code\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical_code from normalize_ppml_term results (e.g. '85191')\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"imo_lexical_code\"\r\n  ]\r\n}\r\n```\r\n\r\n#### Inputs\r\n\r\n| Parameter | Type | Required | Meaning, default, and constraints |\r\n| --- | --- | --- | --- |\r\n| `domain` | `string` | No | The lexical domain (e.g. 'problem', 'procedure', 'medication') |\r\n| `imo_lexical_code` | `string` | Yes | The lexical_code from normalize_ppml_term results (e.g. '85191') |\r\n\r\n---\r\n\r\n### 3. `graphql_modifier___get_narrower_hierarchy`\r\n\r\n**When to use:** Use to navigate parents and children of a sufficiently focused Problem lexical. For a broad starting concept, prefer allowed refinements or filtered narrower concepts.\r\n\r\n#### Purpose, documented response, and behavior\r\n\r\nExplore the hierarchy of an IMO lexical in the Knowledge Graph — both up and down.\r\n\r\nIMPORTANT: Use the 'lexical_code' value from normalize_ppml_term results\r\nas the code parameter (NOT the imo_code). Returns one level of broader\r\n(parents) and one level of narrower (children) IMO lexicals from the problem\r\nhierarchy. To walk further in either direction, call again with that\r\nconcept's code. Use this to navigate the hierarchy and identify related terms\r\nat different specificity levels.\r\nNote: the problem hierarchy (domainBroader/domainNarrower) is only available\r\nfor the 'problem' domain.\r\n\r\nEach level is paged; total_broader_available / total_narrower_available give the\r\ntrue counts, and `offset` walks further.\r\n\r\n#### Input arguments exposed by the connected MCP tool\r\n\r\nHost-visible tool: `mcp__imo_health__graphql_modifier___get_narrower_hierarchy`.\r\n\r\n```typescript\r\ntype Input = {\r\n  // The lexical domain (e.g. 'problem', 'procedure', 'medication')\r\n  domain?: string;\r\n  // The lexical_code from normalize_medical_term results (e.g. '78845' for knee pain)\r\n  imo_lexical_code: string;\r\n  // Zero-based paging offset applied at each hierarchy level. At most 100 broader and 100 narrower concepts are returned per level; compare total_broader_available / total_narrower_available against what you received to see whether another page exists.\r\n  offset?: number;\r\n};\r\n```\r\n\r\n#### Documented input schema (JSON Schema)\r\n\r\n```json\r\n{\r\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n  \"title\": \"graphql_modifier___get_narrower_hierarchy\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"domain\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical domain (e.g. 'problem', 'procedure', 'medication')\"\r\n    },\r\n    \"imo_lexical_code\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical_code from normalize_ppml_term results (e.g. '78845' for knee pain)\"\r\n    },\r\n    \"offset\": {\r\n      \"type\": \"number\",\r\n      \"description\": \"Zero-based paging offset applied at each hierarchy level. At most 100 broader and 100 narrower concepts are returned per level; compare total_broader_available / total_narrower_available against what you received to see whether another page exists.\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"imo_lexical_code\"\r\n  ]\r\n}\r\n```\r\n\r\n#### Inputs\r\n\r\n| Parameter | Type | Required | Meaning, default, and constraints |\r\n| --- | --- | --- | --- |\r\n| `domain` | `string` | No | The lexical domain (e.g. 'problem', 'procedure', 'medication') |\r\n| `imo_lexical_code` | `string` | Yes | The lexical_code from normalize_ppml_term results (e.g. '78845' for knee pain) |\r\n| `offset` | `number` | No | Zero-based paging offset applied at each hierarchy level. At most 100 broader and 100 narrower concepts are returned per level; compare total_broader_available / total_narrower_available against what you received to see whether another page exists. |\r\n\r\n---\r\n\r\n## C. Refinements\r\n\r\n### 4. `graphql_modifier___get_allowed_refinements`\r\n\r\n**When to use:** Use when the user asks how a Problem lexical can become more specific or wants all available refinement paths.\r\n\r\n#### Purpose, documented response, and behavior\r\n\r\nLook up allowed refinements (also known as modifiers) for an IMO Problem lexical in the Knowledge Graph.\r\n\r\nIMPORTANT: Use the 'lexical_code' value from normalize_ppml_term results\r\nas the code parameter (NOT the imo_code). Returns the refinement group(s) and\r\nrefinement option(s) that can be applied to make the IMO lexical more specific\r\n(e.g., laterality, chronicity, location). Each allowed refinement includes its\r\ngroup code and title for categorization.\r\nNote: allowedRefinements are only available for the 'problem' domain.\r\n\r\n#### Input arguments exposed by the connected MCP tool\r\n\r\nHost-visible tool: `mcp__imo_health__graphql_modifier___get_allowed_refinements`.\r\n\r\n```typescript\r\ntype Input = {\r\n  // The lexical domain (e.g. 'problem', 'procedure', 'medication')\r\n  domain?: string;\r\n  // The lexical_code from normalize_medical_term results (e.g. '78845' for knee pain)\r\n  imo_lexical_code: string;\r\n  // Zero-based paging offset. At most 100 refinements are returned per call; compare total_allowed_refinements_available against what you received to see whether another page exists.\r\n  offset?: number;\r\n};\r\n```\r\n\r\n#### Documented input schema (JSON Schema)\r\n\r\n```json\r\n{\r\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n  \"title\": \"graphql_modifier___get_allowed_refinements\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"domain\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical domain (e.g. 'problem', 'procedure', 'medication')\"\r\n    },\r\n    \"imo_lexical_code\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical_code from normalize_ppml_term results (e.g. '78845' for knee pain)\"\r\n    },\r\n    \"offset\": {\r\n      \"type\": \"number\",\r\n      \"description\": \"Zero-based paging offset. At most 100 refinements are returned per call; compare total_allowed_refinements_available against what you received to see whether another page exists.\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"imo_lexical_code\"\r\n  ]\r\n}\r\n```\r\n\r\n#### Inputs\r\n\r\n| Parameter | Type | Required | Meaning, default, and constraints |\r\n| --- | --- | --- | --- |\r\n| `domain` | `string` | No | The lexical domain (e.g. 'problem', 'procedure', 'medication') |\r\n| `imo_lexical_code` | `string` | Yes | The lexical_code from normalize_medical_term results (e.g. '78845' for knee pain) |\r\n| `offset` | `number` | No | Zero-based paging offset. At most 100 refinements are returned per call; compare total_allowed_refinements_available against what you received to see whether another page exists. |\r\n\r\n---\r\n\r\n### 5. `graphql_modifier___get_refinement_group`\r\n\r\n**When to use:** Use when the user wants every option in a particular refinement category returned by the graph.\r\n\r\n#### Purpose, documented response, and behavior\r\n\r\nLook up all refinements within a specific refinement group.\r\n\r\nReturns the group title and all available refinement options within the category.\r\nUse this to see all possible values for a refinement type (e.g., all laterality\r\noptions: right, left, bilateral, unilateral, unspecified). Get the group notation\r\nfrom the 'group.code' field in get_allowed_refinements or get_lexical results.\r\n\r\n#### Input arguments exposed by the connected MCP tool\r\n\r\nHost-visible tool: `mcp__imo_health__graphql_modifier___get_refinement_group`.\r\n\r\n```typescript\r\ntype Input = {\r\n  // The refinement group notation/code (e.g. '149' for laterality)\r\n  notation: string;\r\n};\r\n```\r\n\r\n#### Documented input schema (JSON Schema)\r\n\r\n```json\r\n{\r\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n  \"title\": \"graphql_modifier___get_refinement_group\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"notation\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The refinement group notation/code (e.g. '149' for laterality)\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"notation\"\r\n  ]\r\n}\r\n```\r\n\r\n#### Inputs\r\n\r\n| Parameter | Type | Required | Meaning, default, and constraints |\r\n| --- | --- | --- | --- |\r\n| `notation` | `string` | Yes | The refinement group notation/code (e.g. '149' for laterality) |\r\n\r\n#### Interpretation and related-tool guidance\r\n\r\nThis is the exception to the lexical-code rule: it takes the refinement GROUP notation from `group.code`, not a lexical code or an individual refinement-option code.\r\n\r\n---\r\n\r\n### 6. `graphql_modifier___get_narrower_with_refinements`\r\n\r\n**When to use:** Use after discovering valid refinement option codes to retrieve matching, more-specific Problem lexicals.\r\n\r\n#### Purpose, documented response, and behavior\r\n\r\nGet narrower IMO lexicals filtered by specific refinement criteria.\r\n\r\nIMPORTANT: Use the 'lexical_code' value from normalize_ppml_term results\r\nas the code parameter (NOT the imo_code). Returns only the narrower (more specific)\r\nIMO lexicals that match the given refinement codes. Use this after calling\r\nget_allowed_refinements to filter children by specific refinement options\r\n(e.g., find all knee pain variants with laterality:right).\r\nNote: appliedRefinements are only available for the 'problem' domain.\r\n\r\nResults are paged: total_matching_available is the true size of the filtered set,\r\ntotal_matching is what this page contains, and `offset` walks further.\r\n\r\n#### Input arguments exposed by the connected MCP tool\r\n\r\nHost-visible tool: `mcp__imo_health__graphql_modifier___get_narrower_with_refinements`.\r\n\r\n```typescript\r\ntype Input = {\r\n  // The lexical domain (e.g. 'problem', 'procedure', 'medication')\r\n  domain?: string;\r\n  // The lexical_code from normalize_medical_term results (e.g. '78845' for knee pain)\r\n  imo_lexical_code: string;\r\n  // Zero-based paging offset. At most 100 matching narrower concepts are returned per call; compare total_matching_available against what you received to see whether another page exists.\r\n  offset?: number;\r\n  // List of refinement codes to filter narrower lexicals by (e.g. ['230'] for laterality:right)\r\n  refinement_codes: Array<string>;\r\n};\r\n```\r\n\r\n#### Documented input schema (JSON Schema)\r\n\r\n```json\r\n{\r\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n  \"title\": \"graphql_modifier___get_narrower_with_refinements\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"domain\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical domain (e.g. 'problem', 'procedure', 'medication')\"\r\n    },\r\n    \"imo_lexical_code\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical_code from normalize_ppml_term results (e.g. '78845' for knee pain)\"\r\n    },\r\n    \"offset\": {\r\n      \"type\": \"number\",\r\n      \"description\": \"Zero-based paging offset. At most 100 matching narrower concepts are returned per call; compare total_matching_available against what you received to see whether another page exists.\"\r\n    },\r\n    \"refinement_codes\": {\r\n      \"type\": \"array\",\r\n      \"items\": {\r\n        \"type\": \"string\"\r\n      },\r\n      \"description\": \"List of refinement codes to filter narrower lexicals by (e.g. ['230'] for laterality:right)\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"imo_lexical_code\",\r\n    \"refinement_codes\"\r\n  ]\r\n}\r\n```\r\n\r\n#### Inputs\r\n\r\n| Parameter | Type | Required | Meaning, default, and constraints |\r\n| --- | --- | --- | --- |\r\n| `domain` | `string` | No | The lexical domain (e.g. 'problem', 'procedure', 'medication') |\r\n| `imo_lexical_code` | `string` | Yes | The lexical_code from normalize_ppml_term results (e.g. '78845' for knee pain) |\r\n| `offset` | `number` | No | Zero-based paging offset. At most 100 matching narrower concepts are returned per call; compare total_matching_available against what you received to see whether another page exists. |\r\n| `refinement_codes` | `Array<string>` | Yes | List of refinement codes to filter narrower lexicals by (e.g. ['230'] for laterality:right) |\r\n\r\n---\r\n\r\n### 7. `graphql_modifier___get_narrower_sequential_refinements`\r\n\r\n**When to use:** Use when several supported refinements must be applied in sequence. A single call supports at most three nesting levels; continue from a returned lexical if the evidence supports further refinement.\r\n\r\n#### Purpose, documented response, and behavior\r\n\r\nApply refinements as nested GraphQL traversal to find progressively more specific IMO lexicals.\r\n\r\nIMPORTANT: Use the 'lexical_code' value from normalize_ppml_term results\r\nas the code parameter (NOT the imo_code). This tool builds a single nested\r\nGraphQL query where each refinement level creates a deeper narrower() call.\r\nThe depth of nesting is determined dynamically by the length of refinement_sequence.\r\n\r\nExample: refinement_sequence=[[\"230\"], [\"362636588\"], [\"1328819463\"]], domain=\"problem\" generates:\r\nlexical(code: \"601056\", domain: problem) {\r\n  narrower(refinements: [\"230\"]) {\r\n    ... on ProblemLexical { allowedRefinements { ... } }\r\n    narrower(refinements: [\"362636588\"]) {\r\n      ... on ProblemLexical { allowedRefinements { ... } }\r\n      narrower(refinements: [\"1328819463\"]) {\r\n        ... on ProblemLexical { allowedRefinements { ... } }\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\nThis is ideal for agents that need to drill down through multiple\r\nrefinement levels in a single query. The agent determines the depth dynamically\r\nbased on user requirements.\r\n\r\n#### Input arguments exposed by the connected MCP tool\r\n\r\nHost-visible tool: `mcp__imo_health__graphql_modifier___get_narrower_sequential_refinements`.\r\n\r\n```typescript\r\ntype Input = {\r\n  // The lexical domain (e.g. 'problem', 'procedure', 'medication')\r\n  domain?: string;\r\n  // The starting lexical_code from normalize_medical_term results (e.g. '601056')\r\n  imo_lexical_code: string;\r\n  // If true, include allowedRefinements at every nesting level\r\n  include_allowed_refinements?: boolean;\r\n  // If true, include code mappings (ICD-10, SNOMED, etc.) at the deepest level of results\r\n  include_mappings?: boolean;\r\n  // Ordered sequence of refinement code lists to apply as nested filters. Each level creates a deeper narrower() nesting. Example: [['230'], ['362636588'], ['1328819463']] creates 3 levels of nesting. At most 3 levels (the Knowledge Graph API rejects deeper queries).\r\n  refinement_sequence: Array<Array<string>>;\r\n};\r\n```\r\n\r\n#### Documented input schema (JSON Schema)\r\n\r\n```json\r\n{\r\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n  \"title\": \"graphql_modifier___get_narrower_sequential_refinements\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"domain\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical domain (e.g. 'problem', 'procedure', 'medication')\"\r\n    },\r\n    \"imo_lexical_code\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The starting lexical_code from normalize_ppml_term results (e.g. '601056')\"\r\n    },\r\n    \"include_allowed_refinements\": {\r\n      \"type\": \"boolean\",\r\n      \"description\": \"If true, include allowedRefinements at every nesting level\"\r\n    },\r\n    \"include_mappings\": {\r\n      \"type\": \"boolean\",\r\n      \"description\": \"If true, include code mappings (ICD-10, SNOMED, etc.) at the deepest level of results\"\r\n    },\r\n    \"refinement_sequence\": {\r\n      \"type\": \"array\",\r\n      \"items\": {\r\n        \"type\": \"array\",\r\n        \"items\": {\r\n          \"type\": \"string\"\r\n        }\r\n      },\r\n      \"maxItems\": 3,\r\n      \"description\": \"Ordered sequence of refinement code lists to apply as nested filters. Each level creates a deeper narrower() nesting. Example: [['230'], ['362636588'], ['1328819463']] creates 3 levels of nesting. At most 3 levels (the Knowledge Graph API rejects deeper queries).\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"imo_lexical_code\",\r\n    \"refinement_sequence\"\r\n  ]\r\n}\r\n```\r\n\r\n#### Inputs\r\n\r\n| Parameter | Type | Required | Meaning, default, and constraints |\r\n| --- | --- | --- | --- |\r\n| `domain` | `string` | No | The lexical domain (e.g. 'problem', 'procedure', 'medication') |\r\n| `imo_lexical_code` | `string` | Yes | The starting lexical_code from normalize_ppml_term results (e.g. '601056') |\r\n| `include_allowed_refinements` | `boolean` | No | If true, include allowedRefinements at every nesting level |\r\n| `include_mappings` | `boolean` | No | If true, include code mappings (ICD-10, SNOMED, etc.) at the deepest level of results |\r\n| `refinement_sequence` | `Array<Array<string>>` | Yes | Ordered sequence of refinement code lists to apply as nested filters. Each level creates a deeper narrower() nesting. Example: [['230'], ['362636588'], ['1328819463']] creates 3 levels of nesting. At most 3 levels (the Knowledge Graph API rejects deeper queries). |\r\n\r\n#### Interpretation and related-tool guidance\r\n\r\nEach outer-array entry adds one traversal level; each entry is a list of refinement codes at that level. The API rejects more than three levels per call. `include_allowed_refinements` adds options at every level; `include_mappings` adds mappings only at the deepest level.\r\n\r\n---\r\n\r\n## D. Cross-Domain Relationships\r\n\r\n### 8. `graphql_modifier___get_cross_domain`\r\n\r\n**When to use:** Use to find relationships from a Problem lexical to procedures, medications, findings, causes, and temporal concepts.\r\n\r\n#### Purpose, documented response, and behavior\r\n\r\nDiscover cross-domain clinical relationships for an IMO Problem lexical in the Knowledge Graph.\r\n\r\nIMPORTANT: Use the 'lexical_code' value from normalize_ppml_term results\r\nas the code parameter (NOT the imo_code). Returns the clinical relationships\r\nlinked to the problem across other domains (procedures, medications, findings):\r\n\r\n- associated findings / procedures / lab procedures\r\n- treatments (primary) plus supportive medications\r\n- causative agents and due-to causes (etiology)\r\n- temporally-related concepts (during / after / before)\r\n- realizations, finding methods, routine lab procedures, and interpreted procedures\r\n\r\nUse this to uncover relevant connections with terms in other clinical domains.\r\nAny given relationship may be empty for a particular concept — coverage varies\r\nby lexical.\r\n\r\nResults are paged. `totals` gives the true size of each relationship and\r\n`truncated` how many items lie beyond the page you received; pass `offset` to\r\nwalk further. Relationships can be very large (some run into six figures), so\r\nprefer narrowing the concept over paging through everything.\r\n\r\n#### Input arguments exposed by the connected MCP tool\r\n\r\nHost-visible tool: `mcp__imo_health__graphql_modifier___get_cross_domain`.\r\n\r\n```typescript\r\ntype Input = {\r\n  // The lexical_code from normalize_medical_term results (e.g. '15847774' for carcinoma of right breast, '41297' for Crohn's disease)\r\n  imo_lexical_code: string;\r\n  // Zero-based paging offset applied to every relationship. Each relationship returns at most 100 items per call; use `totals` and `truncated` in the response to decide whether to request the next page (offset=100, then 200, ...).\r\n  offset?: number;\r\n};\r\n```\r\n\r\n#### Documented input schema (JSON Schema)\r\n\r\n```json\r\n{\r\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n  \"title\": \"graphql_modifier___get_cross_domain\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"imo_lexical_code\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical_code from normalize_ppml_term results (e.g. '15847774' for carcinoma of right breast, '41297' for Crohn's disease)\"\r\n    },\r\n    \"offset\": {\r\n      \"type\": \"number\",\r\n      \"description\": \"Zero-based paging offset applied to every relationship. Each relationship returns at most 100 items per call; use `totals` and `truncated` in the response to decide whether to request the next page (offset=100, then 200, ...).\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"imo_lexical_code\"\r\n  ]\r\n}\r\n```\r\n\r\n#### Inputs\r\n\r\n| Parameter | Type | Required | Meaning, default, and constraints |\r\n| --- | --- | --- | --- |\r\n| `imo_lexical_code` | `string` | Yes | The lexical_code from normalize_ppml_term results (e.g. '15847774' for carcinoma of right breast, '41297' for Crohn's disease) |\r\n| `offset` | `number` | No | Zero-based paging offset applied to every relationship. Each relationship returns at most 100 items per call; use `totals` and `truncated` in the response to decide whether to request the next page (offset=100, then 200, ...). |\r\n\r\n#### Interpretation and related-tool guidance\r\n\r\nInput is a Problem lexical; this tool has no `domain` parameter. Empty relationships mean no relationship was returned for this lexical. They do not prove clinical absence.\r\n\r\n---\r\n\r\n### 9. `graphql_modifier___get_related_problems`\r\n\r\n**When to use:** Use for the reverse direction: from a Procedure or Medication lexical to related problems.\r\n\r\n#### Purpose, documented response, and behavior\r\n\r\nFind the clinical problems related to a procedure or medication (reverse lookup).\r\n\r\nIMPORTANT: Use the 'lexical_code' value from normalize_ppml_term results\r\nas the code parameter (NOT the imo_code). This traverses the cross-domain graph\r\nin reverse — from a procedure or medication back to the problems that reference it.\r\n\r\n- procedure: returns associatedProblems, interpretedFindings, determinedProblems\r\n  (problems this procedure is a finding method for), causedProblems, realizedProblems.\r\n- medication: returns treatedProblems, causedProblems (problems this\r\n  medication is a causative agent for).\r\n\r\nUse this to answer \"what problems is this procedure/medication used for?\".\r\n\r\nResults are paged. These relationships are the largest in the graph — a common\r\nmedication treats six figures' worth of problems — so `totals` reports the true\r\nsize, `truncated` how many lie beyond your page, and `offset` walks further.\r\n\r\n#### Input arguments exposed by the connected MCP tool\r\n\r\nHost-visible tool: `mcp__imo_health__graphql_modifier___get_related_problems`.\r\n\r\n```typescript\r\ntype Input = {\r\n  // The domain of the input code: 'procedure' or 'medication'. (Use get_cross_domain for the 'problem' direction.)\r\n  domain?: string;\r\n  // The lexical_code of a procedure or medication (from normalize_medical_term results)\r\n  imo_lexical_code: string;\r\n  // Zero-based paging offset applied to every relationship. Each relationship returns at most 100 items per call; use `totals` and `truncated` in the response to decide whether to request the next page.\r\n  offset?: number;\r\n};\r\n```\r\n\r\n#### Documented input schema (JSON Schema)\r\n\r\n```json\r\n{\r\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n  \"title\": \"graphql_modifier___get_related_problems\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"domain\": {\r\n      \"type\": \"string\",\r\n      \"enum\": [\r\n        \"procedure\",\r\n        \"medication\"\r\n      ],\r\n      \"description\": \"The domain of the input code: 'procedure' or 'medication'. (Use get_cross_domain for the 'problem' direction.)\"\r\n    },\r\n    \"imo_lexical_code\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"The lexical_code of a procedure or medication (from normalize_ppml_term results)\"\r\n    },\r\n    \"offset\": {\r\n      \"type\": \"number\",\r\n      \"description\": \"Zero-based paging offset applied to every relationship. Each relationship returns at most 100 items per call; use `totals` and `truncated` in the response to decide whether to request the next page.\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"imo_lexical_code\"\r\n  ]\r\n}\r\n```\r\n\r\n#### Inputs\r\n\r\n| Parameter | Type | Required | Meaning, default, and constraints |\r\n| --- | --- | --- | --- |\r\n| `domain` | `string` | No | The domain of the input code: 'procedure' or 'medication'. (Use get_cross_domain for the 'problem' direction.) |\r\n| `imo_lexical_code` | `string` | Yes | The lexical_code of a procedure or medication (from normalize_ppml_term results) |\r\n| `offset` | `number` | No | Zero-based paging offset applied to every relationship. Each relationship returns at most 100 items per call; use `totals` and `truncated` in the response to decide whether to request the next page. |\r\n\r\n#### Interpretation and related-tool guidance\r\n\r\nSet `domain` explicitly to `procedure` or `medication`. `offset` applies to every relationship; the cap is 100 per relationship, not 100 across the whole response.\r\n\r\n---\r\n\r\n## Domain and Identifier Rules\r\n\r\n- Supply the returned `lexical_code` as `imo_lexical_code`, never the internal `imo_code`.\r\n- `get_refinement_group` instead requires the group's notation/code; see its parameter table.\r\n- Use lowercase GraphQL domain values: `problem`, `procedure`, `medication`. The mapping tool documents `problem` as its default. Set the domain explicitly rather than relying on defaults that other live definitions do not specify.\r\n- Applied/allowed refinements and Problem hierarchy are Problem-domain capabilities. Optional domain parameters do not establish support for these features in other domains.\r\n- A Lab normalization result does not establish a Lab domain for GraphQL mappings.\r\n\r\n## Diagnostic Specificity Workflow\r\n\r\n1. Normalize or search the evidence-supported phrase, preserving documented site, laterality, type, chronicity, and other detail.\r\n2. If further refinement is needed, inspect `get_allowed_refinements` or the lexical's allowed refinements.\r\n3. Present all valid returned refinement paths when exploration is requested. Keep group IDs distinct from option IDs.\r\n4. Apply only documented options through filtered narrower concepts or sequential refinements. Set `include_allowed_refinements=true` to see what remains.\r\n5. Continue from returned lexicals until no further option exists or the clinical evidence supports no greater specificity. Each sequential call supports at most three levels.\r\n6. Retrieve mappings for the final supported lexical, or request mappings at the deepest sequential level.\r\n7. For a \"most specific code\" request, present the supported result directly rather than dumping the full hierarchy.\r\n\r\n## Mapping Coverage and Response Detail\r\n\r\n| Domain | Supported filter values | Additional advertised detail |\r\n| --- | --- | --- |\r\n| problem | `icd10cm`, `icd10ca`, `icd9cm`, `snomedInternational`, `snomedCa`, `snomedUs`, `dsm5`, `icdO`, `mondo` | With `include_hcc=true`, ICD-10-CM HCC entries include category, description, and model such as `CMS_HCC_V28` or `RX_HCC_V08` |\r\n| procedure | `cpt`, `hcpcs`, `icd10pcs`, `loinc`, `snomedInternational` | Mapping code, title, system, relationship type |\r\n| medication | `rxnorm`, `ndc`, `cvx`, `snomedInternational` | RxNorm term-type titles; NDC brand/generic name, dosage form, route, labeler, active ingredients, package codes; CVX vaccine status and MVX manufacturers |\r\n\r\nSupported mapping relationship types are `exactMatch`, `closeMatch`, `broadMatch`, `narrowMatch`, and `relatedMatch`. Availability depends on the lexical; do not imply that every listed system returns a mapping.\r\n\r\n## Pagination and Large Result Sets\r\n\r\n| Tool | Page cap | Completeness indicators |\r\n| --- | --- | --- |\r\n| Allowed refinements | 100 refinements | `total_allowed_refinements_available` |\r\n| Hierarchy | 100 broader and 100 narrower concepts per level | `total_broader_available`, `total_narrower_available` |\r\n| Filtered narrower concepts | 100 matches | `total_matching_available` is the full set; `total_matching` is this page |\r\n| Cross-domain relationships | 100 items per relationship | `totals`, `truncated` |\r\n| Related problems | 100 items per relationship | `totals`, `truncated` |\r\n\r\nOffsets are zero-based; for 100-item pages continue at 100, 200, and so on when needed. Report when a result is partial. For broad concepts or payload errors, show available top-level pathways and ask which pathway to explore instead of retrieving enormous relationship sets. Some relationship sets contain hundreds of thousands of items.\r\n\r\n## Relationship Workflows\r\n\r\n- Problem → `get_cross_domain` for associated procedures/findings, treatment relationships, etiologic relationships, and temporal relationships.\r\n- Procedure or Medication → `get_related_problems` for the reverse relationship direction.\r\n- Terminology relationships describe graph associations; they do not establish a patient-specific diagnosis or recommended treatment.\r\n- Use GuidelineCentral if the user requests guideline-supported clinical recommendations rather than terminology associations.\r\n\r\n## Chaining to Other Skills\r\n\r\n- **Need a lexical_code first?** → use `imo-normalize` or `imo-core-search`\r\n- **Need to extract terms from text?** → use `imo-nlp` first, then use lexical codes here\r\n- **Need SPARQL queries?** → use `imo-knowledge-graph-explorer` for direct graph access\r\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}