Skip to main content
Glama

read_file_by_path

Look up a file by its exact absolute path and return its content. Use when you have the path but no file ID; the path must match the indexed version exactly.

Instructions

Look up a file by its absolute on-disk path and return the same shape as read_file. The path must EXACTLY match what Kontexta indexed — no symlink resolution, no path normalisation beyond what the OS does, no trailing-slash tolerance. Returns isError if no row matches (the file may exist on disk but not be indexed — try refresh_index). Read-only; no side effects, auth, or rate limits. Use when an agent has a path from its working directory but no file ID; if you have the ID, prefer read_file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path on disk (must match the path stored in Kontexta)
Behavior5/5

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

With no annotations, the description fully bears the burden. It discloses read-only nature, no side effects, no auth or rate limits, and specific path matching constraints (no symlink resolution, no normalization, no trailing-slash tolerance). It also explains the isError return for unindexed files.

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

Conciseness5/5

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

The description is concise (4-5 sentences) and front-loaded with the main purpose. Every sentence adds value, no redundancy, and it efficiently covers all necessary information.

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 no annotations or output schema, the description is largely self-sufficient. It covers input behavior, edge cases, and side effects. The return shape is referenced to `read_file`, which assumes prior knowledge, but this is reasonable in context. Slight gap in detailing success return fields.

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% with one parameter. The description adds meaning beyond the schema's description by detailing exact match requirements and constraints, which helps the agent understand how to provide the path correctly.

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 looks up a file by absolute on-disk path and returns the same shape as `read_file`. It explicitly distinguishes from the sibling `read_file` by specifying when to use each, ensuring clear purpose differentiation.

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?

Provides explicit guidance: 'Use when an agent has a path from its working directory but no file ID; if you have the ID, prefer `read_file`.' Also advises trying `refresh_index` if the file is not indexed. This covers when to use and alternatives.

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/safiyu/kontexta'

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