Skip to main content
Glama
smat-dev

Jinni: Bring Your Project Into Context

by smat-dev

read_context

Extract and analyze project context by focusing on specified files or directories within a root path. Provides a static view of relevant files, using default exclusions or custom rules for precise filtering.

Instructions

Reads context from a specified project root directory (absolute path). Focuses on the specified target files/directories within that root. Returns a static view of files with paths relative to the project root. Assume the user wants to read in context for the whole project unless otherwise specified - do not ask the user for clarification if just asked to read context. If the user just says 'jinni', interpret that as read_context. If the user asks to list context, use the list_only argument. Both targets and rules accept a JSON array of strings. The project_root, targets, and rules arguments are mandatory. You can ignore the other arguments by default. IMPORTANT NOTE ON RULES: Ensure you understand the rule syntax (details available via the usage tool) before providing specific rules. Using rules=[] is recommended if unsure, as this uses sensible defaults.

Guidance for AI Model Usage

When requesting context using this tool:

  • Default Behavior: If you provide an empty rules list ([]), Jinni uses sensible default exclusions (like .git, node_modules, __pycache__, common binary types) combined with any project-specific .contextfiles. This usually provides the "canonical context" - files developers typically track in version control. Assume this is what the users wants if they just ask to read context.

  • Targeting Specific Files: If you have a list of specific files you need (e.g., ["src/main.py", "README.md"]), provide them in the targets list. This is efficient and precise, quicker than reading one by one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
debug_explainNo
exclusionsNoOptional exclusion configuration. Object with 'global' (list of keywords), 'scoped' (object mapping paths to keyword lists), and 'patterns' (list of file patterns) fields.
list_onlyNo
project_rootYes**MUST BE ABSOLUTE PATH**. The absolute path to the project root directory.
rulesYes**Mandatory**. List of inline filtering rules. Provide `[]` if no specific rules are needed (uses defaults). It is strongly recommended to consult the `usage` tool documentation before providing a non-empty list.
size_limit_mbNo
targetsYes**Mandatory**. List of paths (absolute or relative to CWD) to specific files or directories within the project root to process. Must be a JSON array of strings. If empty (`[]`), the entire `project_root` is processed.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the tool returns a 'static view' (implying read-only, non-destructive), uses 'sensible default exclusions' when rules=[], and provides guidance on default behavior and targeting efficiency. However, it doesn't explicitly mention permission requirements, rate limits, or error handling, leaving some behavioral aspects uncovered.

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

Conciseness3/5

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

The description is appropriately front-loaded with core functionality, but it contains some redundancy (e.g., repeating that targets and rules accept JSON arrays) and includes implementation details like 'You can ignore the other arguments by default' that could be streamlined. The 'Guidance for AI Model Usage' section is helpful but adds length. Overall, it's informative but could be more concise.

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

Completeness4/5

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

Given the tool's complexity (7 parameters, 57% schema coverage, no annotations, but with an output schema), the description is mostly complete. It covers the core purpose, usage guidelines, parameter semantics for key inputs, and behavioral context. The output schema exists, so return values needn't be explained. However, it lacks details on less critical parameters like 'debug_explain' and 'size_limit_mb', and doesn't mention error cases or performance implications.

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 description coverage is 57%, so the description must compensate. It adds significant value beyond the schema: it explains that 'targets' and 'rules' accept JSON arrays, clarifies that empty rules ([]) use sensible defaults, provides examples of default exclusions, and gives practical guidance on when to use specific targets versus processing the entire root. However, it doesn't fully explain all 7 parameters, particularly 'debug_explain' and 'size_limit_mb'.

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 the tool's purpose: 'Reads context from a specified project root directory' and 'Returns a static view of files with paths relative to the project root.' It specifies the verb (read), resource (context/files), and scope (project root directory), distinguishing it from the sibling 'usage' tool which provides documentation rather than file reading.

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?

The description provides explicit guidance on when to use this tool: 'Assume the user wants to read in context for the whole project unless otherwise specified' and 'If the user just says 'jinni', interpret that as read_context.' It also specifies when to use the list_only argument: 'If the user asks to list context, use the list_only argument.' This gives clear usage rules and context for invocation.

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

Related 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/smat-dev/jinni'

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