Skip to main content
Glama

kernel_code_read

Read project source files safely with line limits and offsets. Restricted to src so .env, credentials, node_modules, and data stay unreadable.

Instructions

Read a source file from the project (read-only). Restricted to project src — cannot read .env, credentials, node_modules, or data.

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": {
      "path": "<path>"
    },
    "name": "kernel_code_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRelative path from project root (e.g. 'src/core/logger.ts')
limitNoMax lines to return (default: 200) (max 1000)
offsetNoStart line (1-based, default: 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description shoulders the full burden and does disclose the two traits that matter most: the operation is read-only and hard-blocked from sensitive paths. It omits what happens on a missing/out-of-scope file (error vs. empty result) and whether truncated reads are signalled, which would matter for a file reader.

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?

Two short sentences, zero filler, with the read-only and scope constraints front-loaded. Every clause carries information the agent needs.

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?

For a three-parameter read tool with a fully documented schema and no output schema, the description plus schema covers invocation well. The remaining gap is return-shape expectations (truncation signalling, behavior on inaccessible paths), which is minor but non-trivial for a reader.

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 all three parameters (path, limit, offset with defaults and max) are fully documented in the schema. The description adds no parameter-level meaning beyond the schema, so baseline 3 applies.

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 ('Read a source file from the project') and immediately qualifies it as read-only. The scope clause ('Restricted to project src') makes it distinguishable at a glance from kernel_code_search and kernel_code_run 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 Guidelines4/5

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

Gives explicit negative guidance — cannot read .env, credentials, node_modules, or data — which tells the agent when this tool will fail and should not be attempted. It stops short of naming an alternative tool for cases outside src (e.g. search), so no positive routing is provided.

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

Deploy Server

Other Tools