Skip to main content
Glama

List a directory

list_directory
Read-onlyIdempotent

Lists one directory of a tree: its index.md (when it has one), its subdirectories with how many concepts each holds, and the concepts directly in it, each with its ID for get_concept. Use it to browse a tree's folders, or to see what else is in a page's folder; search_concepts finds concepts by what they say, wherever they are, and list_trees lists the trees. A directory the tree doesn't have is an error.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory, e.g. `product`; omit for the root.
treeNoThe tree's slug, as list_trees gives it (not its name). Required unless the Forest has one tree.

Output Schema

NameRequiredDescriptionDefault
urlYesThe directory's page in OKForest.
pathYesThe directory listed; empty for the root.
treeYesThe tree, and the commit it was read at.
indexNoThe directory's `index.md`, when it has one.
conceptsYesThe concepts directly in it.
directoriesYesIts subdirectories.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / tree / description
      Previous value: -"The tree's slug, as list_trees gives it (not its name). The tree to list; omit to list the trees."New value: +"The tree's slug, as list_trees gives it (not its name). Required unless the Forest has one tree."
    • removedOutput schema / properties / account
      Removed value: -{
      -  "additionalProperties": {},
      -  "description": "Without `tree`: the account whose Forest this is.",
      -  "properties": {
      -    "id": {
      -      "description": "The account's ID.",
      -      "type": "string"
      -    },
      -    "name": {
      -      "description": "The account's name.",
      -      "type": "string"
      -    },
      -    "url": {
      -      "description": "The Forest's home page in OKForest.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "id",
      -    "name",
      -    "url"
      -  ],
      -  "title": "Account",
      -  "type": "object"
      -}
    • removedOutput schema / properties / trees
      Removed value: -{
      -  "description": "Without `tree`: the account's trees.",
      -  "items": {
      -    "additionalProperties": {},
      -    "properties": {
      -      "access": {
      -        "description": "`installation` when read through the OKForest GitHub App, `public` when read as a public repository.",
      -        "enum": [
      -          "installation",
      -          "public"
      -        ],
      -        "type": "string"
      -      },
      -      "description": {
      -        "description": "Its description, when it has one.",
      -        "type": "string"
      -      },
      -      "folder": {
      -        "description": "The folder in the repository it's in; empty for the root.",
      -        "type": "string"
      -      },
      -      "groves": {
      -        "description": "The groves holding it that reach you, by name: how it's shared with you.",
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "name": {
      -        "description": "Its name, when it has one.",
      -        "type": "string"
      -      },
      -      "repo": {
      -        "description": "The GitHub repository it's read from, as `owner/name`.",
      -        "type": "string"
      -      },
      -      "slug": {
      -        "description": "Its slug: what its concept IDs start with, and what `tree` and `trees` take.",
      -        "type": "string"
      -      },
      -      "url": {
      -        "description": "The tree's page in OKForest.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "slug",
      -      "repo",
      -      "folder",
      -      "access",
      -      "groves",
      -      "url"
      -    ],
      -    "title": "Tree",
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / required
      Added value: +[
      +  "tree",
      +  "path",
      +  "url",
      +  "directories",
      +  "concepts"
      +]
  2. Changed3 schema fields changed
    • changedOutput schema / properties / concepts / items / properties / status / description
      Previous value: -"Its lifecycle status; `stable` when it gives none."New value: +"Its lifecycle status; `stable` when it gives none, `unrecognized` for one OKF doesn't define, which isn't stable."
    • changedOutput schema / properties / concepts / items / properties / status / enum
      Previous value: -[
      -  "draft",
      -  "stable",
      -  "deprecated"
      -]New value: +[
      +  "draft",
      +  "stable",
      +  "deprecated",
      +  "unrecognized"
      +]
    • addedOutput schema / properties / concepts / items / properties / statusValue
      Added value: +{
      +  "description": "Its `status` as written, when OKF doesn't define it (`unrecognized`).",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds genuinely new behavioral context: the shape of the result (counts, IDs) and that a nonexistent directory is an error rather than an empty result. It stops short of noting pagination or size limits for large directories, which would have earned a 5.

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?

Three sentences, all front-loaded with the return contents before usage and finally the error case. Each clause is informative, though the middle sentence packs two sibling comparisons plus two use cases into one dense construction that slightly slows scanning.

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 need not explain return values, yet it still previews the structure. Combined with full parameter documentation, complete annotations, and the error behavior for invalid directories, nothing an agent needs to invoke it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100% and both parameters already document the path example and the 'slug, not name' distinction for tree. The description reinforces path validity via the 'directory the tree doesn't have is an error' note but adds no new syntax or format meaning. Baseline 3 applies when the schema carries the parameter burden.

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?

The description names a specific verb and resource (list one directory of a tree) and then enumerates exactly what is returned: index.md, subdirectories with concept counts, and direct concepts with IDs for get_concept. It explicitly distinguishes itself from search_concepts and list_trees, so an agent can pick the right tool without opening any schema.

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

Usage Guidelines5/5

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

It gives two concrete use cases ('browse a tree's folders', 'see what else is in a page's folder') and contrasts them with the alternatives: search_concepts for finding concepts by content anywhere, list_trees for enumerating trees. This is explicit when-to-use plus when-to-use-something-else guidance.

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