Skip to main content
Glama
teamstove

OCD - Organized Context Datastore (MCP)

by teamstove

ocd_get_context_tree

Retrieve a hierarchical context tree (table of contents) for specified root IDs. Supports include/exclude glob patterns and tree-text or JSON output for efficient context navigation.

Instructions

[OCD] コンテキストツリー(目次)を取得

パラメータ

  • rootIds: Context Root の id 配列(list_context_roots で取得した id をそのまま使用)

  • patterns (optional): include glob(rootId 相対)。指定時は depth より優先

  • exclude (optional): exclude glob(rootId 相対)。tree から除外

重要: list_context_roots で返却された id を使用してください。 path フィールド(実際のファイルシステムパス)は使用しないでください。

例:

  • 単一: rootIds: ["tairikut-docs"]

  • 複数: rootIds: ["tairikut-docs", "CORE-docs-for-ai"]

フォーマット

  • tree-text (default): Token効率の良いテキストツリー形式

  • json: 従来のJSON配列形式

表示フォーマット (treeTextFormat)

デフォルト: "$path: $title $summary" 使用可能な変数: $path, $title, $summary

  • cwd: 作業ディレクトリ(設定探索の起点)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYes作業ディレクトリ(設定探索の起点)
depthNo深さ制限 (省略時は全階層)
formatNo出力形式 (default: 'tree-text')
excludeNoexclude glob patterns (rootId 相対)。指定したパスを結果から除外(glob の ignore に変換)
rootIdsYesContext Root の id 配列(list_context_roots で取得した id をそのまま使用) 例: ["tairikut-docs"] または ["tairikut-docs", "CORE-docs-for-ai"]
maxNodesNo返却ノード数上限 (default: 1000)
patternsNoinclude glob patterns (rootId 相対)。指定時は depth の代わりにこれを使用(空配列は未指定扱い)
treeTextFormatNo表示フォーマット (default: "$path: $title $summary"). 変数: $path, $title, $summary
Behavior4/5

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

The description discloses output formats (tree-text vs json), the default format, and the customizable display format using variables, adding behavioral context beyond the schema. It also mentions patterns takes precedence over depth, but does not address rate limits, authorization, or the exact return structure; with no annotations available, this is a moderate but not exhaustive disclosure.

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?

The description is well-organized with separate sections for parameters, format, and display format, making it easy to scan. It includes necessary examples and warnings without excessive verbosity, though some information is redundant with the schema (e.g., cwd appears in both).

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?

Given the tool has no output schema and no annotations, the description covers the essential aspects comprehensively: parameter usage, format selection, display format configuration, and important pitfalls. It even warns about using the wrong id type. Minor details like depth and maxNodes are only in the schema, but they are self-explanatory and do not hinder understanding.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds substantial value by explaining the relationship to list_context_roots and explicitly stating not to use the path field. It provides concrete examples for rootIds, describes patterns/exclude behavior, and elaborates on treeTextFormat variables and defaults, significantly enhancing the schema's brief parameter descriptions.

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 clearly states 'コンテキストツリー(目次)を取得' (get context tree/table of contents), which is a specific verb and resource. It differentiates from sibling tools like ocd_get_contexts by focusing on the tree structure, making the purpose unambiguous.

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

Usage Guidelines4/5

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

The description provides explicit guidance to use IDs from list_context_roots and warns against using the path field, which is a critical usage instruction. It also explains that patterns overrides depth and gives concrete examples for single and multiple roots, but does not explicitly compare against sibling tools like ocd_get_contexts or mention when not to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/teamstove/organized-context-datastore-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server