Skip to main content
Glama

Get route tree

get_route_tree
Read-onlyIdempotent

Return the hierarchical route tree for a product version on a platform, from routes.json (all discovered router/sitemap/link paths) with a fallback to captured page URLs. Large sites are bounded: depth (default 1) cuts deeper levels and reports childCount; pass prefix (for example /en/markets) to expand one branch.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "product": "<product>",
      "platform": "<platform>",
      "version": "<version>"
    },
    "name": "get_route_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
depthNoLevels returned below the root or prefix, clamped to 1..12. Default 1; deeper nodes are summarized by childCount.
prefixNoOptional route path prefix such as /en/markets; only that branch is returned. Empty means the whole tree.
productYesProduct key, for example finance-ozon-ru
versionYesExact capture version returned by list_versions. Pin the same version across related calls; do not use latest as an alias.
platformYesPlatform type ID from list_platforms.options.platforms[].id (backend CatalogPlatform.view). Use backend IDs verbatim; desktop/mobile are current examples. Environment is selected separately.
environmentNoEnvironment ID from the selected backend platform type in list_platforms.options.platforms[].environments[].id (backend implementation). Omit only when the version has one captured environment. Use captured pairs from list_platforms/list_versions for actual availability.

Output Schema

NameRequiredDescriptionDefault
depthYesLevels returned below the root or prefix
prefixYes
routesYesResult entries
productYesproduct
versionYesversion
platformYesplatform
pageCountYesRoutes that map to a captured page
routeCountYesDiscovered routes, including links to pages that were not captured
environmentYesenvironment

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changed
    • changedInput schema / properties / depth / default
      Previous value: -2New value: +1
    • changedInput schema / properties / depth / description
      Previous value: -"Levels returned below the root or prefix, clamped to 1..12. Default 2; deeper nodes are summarized by childCount."New value: +"Levels returned below the root or prefix, clamped to 1..12. Default 1; deeper nodes are summarized by childCount."
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / description
      Previous value: -"Structured result. Existing text or image content remains available in content."New value: +"Discovered route hierarchy"
    • addedOutput schema / properties / depth
      Added value: +{
      +  "description": "Levels returned below the root or prefix",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / environment
      Added value: +{
      +  "description": "environment",
      +  "type": "string"
      +}
    • addedOutput schema / properties / pageCount
      Added value: +{
      +  "description": "Routes that map to a captured page",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / platform
      Added value: +{
      +  "description": "platform",
      +  "type": "string"
      +}
    • addedOutput schema / properties / prefix
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Requested branch path",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / product
      Added value: +{
      +  "description": "product",
      +  "type": "string"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "additionalProperties": true,
      -  "description": "Discovered route hierarchy",
      -  "properties": {
      -    "depth": {
      -      "description": "Levels returned below the root or prefix",
      -      "type": "integer"
      -    },
      -    "environment": {
      -      "description": "environment",
      -      "type": "string"
      -    },
      -    "pageCount": {
      -      "description": "Routes that map to a captured page",
      -      "type": "integer"
      -    },
      -    "platform": {
      -      "description": "platform",
      -      "type": "string"
      -    },
      -    "prefix": {
      -      "anyOf": [
      -        {
      -          "description": "Requested branch path",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "product": {
      -      "description": "product",
      -      "type": "string"
      -    },
      -    "routeCount": {
      -      "description": "Discovered routes, including links to pages that were not captured",
      -      "type": "integer"
      -    },
      -    "routes": {
      -      "description": "Result entries",
      -      "items": {
      -        "$ref": "#/$defs/route"
      -      },
      -      "type": "array"
      -    },
      -    "version": {
      -      "description": "version",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "product",
      -    "platform",
      -    "environment",
      -    "version",
      -    "routeCount",
      -    "pageCount",
      -    "routes",
      -    "prefix",
      -    "depth"
      -  ],
      -  "type": "object"
      -}
    • addedOutput schema / properties / routeCount
      Added value: +{
      +  "description": "Discovered routes, including links to pages that were not captured",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / routes
      Added value: +{
      +  "description": "Result entries",
      +  "items": {
      +    "$ref": "#/$defs/route"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / version
      Added value: +{
      +  "description": "version",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "product",
      +  "platform",
      +  "environment",
      +  "version",
      +  "routeCount",
      +  "pageCount",
      +  "routes",
      +  "prefix",
      +  "depth"
      +]
  2. Changed8 schema fields changed
    • addedInput schema / properties / depth
      Added value: +{
      +  "default": 2,
      +  "description": "Levels returned below the root or prefix, clamped to 1..12. Default 2; deeper nodes are summarized by childCount.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / prefix
      Added value: +{
      +  "default": "",
      +  "description": "Optional route path prefix such as /en/markets; only that branch is returned. Empty means the whole tree.",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / route / properties / childCount
      Added value: +{
      +  "description": "Direct children, including those cut by depth",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / result / properties / depth
      Added value: +{
      +  "description": "Levels returned below the root or prefix",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / result / properties / pageCount / description
      Previous value: -"Count or zero-based index"New value: +"Routes that map to a captured page"
    • addedOutput schema / properties / result / properties / prefix
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Requested branch path",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / result / properties / routeCount / description
      Previous value: -"Count or zero-based index"New value: +"Discovered routes, including links to pages that were not captured"
    • changedOutput schema / properties / result / required
      Previous value: -[
      -  "product",
      -  "platform",
      -  "environment",
      -  "version",
      -  "routeCount",
      -  "pageCount",
      -  "routes"
      -]New value: +[
      +  "product",
      +  "platform",
      +  "environment",
      +  "version",
      +  "routeCount",
      +  "pageCount",
      +  "routes",
      +  "prefix",
      +  "depth"
      +]
  3. Changed2 schema fields changed
    • addedInput schema / properties / version / description
      Added value: +"Exact capture version returned by list_versions. Pin the same version across related calls; do not use latest as an alias."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "route": {
      +      "additionalProperties": true,
      +      "description": "Hierarchical discovered route",
      +      "properties": {
      +        "children": {
      +          "description": "Result entries",
      +          "items": {
      +            "$ref": "#/$defs/route"
      +          },
      +          "type": "array"
      +        },
      +        "page": {
      +          "anyOf": [
      +            {
      +              "description": "Text value",
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "path": {
      +          "description": "path",
      +          "type": "string"
      +        },
      +        "segment": {
      +          "description": "segment",
      +          "type": "string"
      +        },
      +        "url": {
      +          "anyOf": [
      +            {
      +              "description": "Text value",
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "description": "Structured result. Existing text or image content remains available in content.",
      +  "properties": {
      +    "result": {
      +      "additionalProperties": true,
      +      "description": "Discovered route hierarchy",
      +      "properties": {
      +        "environment": {
      +          "description": "environment",
      +          "type": "string"
      +        },
      +        "pageCount": {
      +          "description": "Count or zero-based index",
      +          "type": "integer"
      +        },
      +        "platform": {
      +          "description": "platform",
      +          "type": "string"
      +        },
      +        "product": {
      +          "description": "product",
      +          "type": "string"
      +        },
      +        "routeCount": {
      +          "description": "Count or zero-based index",
      +          "type": "integer"
      +        },
      +        "routes": {
      +          "description": "Result entries",
      +          "items": {
      +            "$ref": "#/$defs/route"
      +          },
      +          "type": "array"
      +        },
      +        "version": {
      +          "description": "version",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "product",
      +        "platform",
      +        "environment",
      +        "version",
      +        "routeCount",
      +        "pageCount",
      +        "routes"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered; the description adds real behavioral context beyond them: the routes.json source with a fallback to captured URLs, a default depth of 1 that truncates and summarizes deeper nodes as childCount, and the prefix-drill pattern. It stops short of saying what happens when routes.json is absent entirely or how the fallback result differs in shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the resource and its source, then the bounding/navigation rule. Dense but every clause carries information; the parenthetical about 'all discovered router/sitemap/link paths' is slightly long but earns its place by defining the contents.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present the description needn't explain return values, and annotations plus the fully documented 6-parameter schema cover safety and field semantics. What remains for the description — data source, fallback, result bounding, and drill-down strategy — is all supplied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds the interaction between depth and prefix that the schema documents only separately: depth=1 yields a summarized tree with childCount, and prefix is the way to expand a single branch. That combined traversal semantics is genuine added meaning beyond the per-field schema text.

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 and resource ('Return the hierarchical route tree') plus scope (product version + platform) and data provenance ('from routes.json ... with a fallback to captured page URLs'). That provenance line distinguishes it from adjacent listing tools like list_pages, so an agent can tell what a route tree is versus a page list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives operational usage guidance ('Large sites are bounded', 'pass prefix ... to expand one branch'), which effectively tells the agent how to traverse large results. However, it never names an alternative tool or states when to prefer this over list_pages or get_page_outline, so the when-to-use decision is only implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources