Skip to main content
Glama

midnight-get-file

Read-only

Retrieve a specific file from Midnight repositories using repository aliases and optional version references. Specify file sections with start and end lines.

Instructions

Retrieve a specific file from Midnight repositories. Use repository aliases like 'compact', 'midnight-js', 'counter', or 'bboard' for convenience.

USAGE GUIDANCE: • Use midnight-list-examples first if you're unsure which file to get • For searching across files, use midnight-search-* tools instead • Use 'ref' parameter to get specific versions (branch, tag, or commit) • Use startLine/endLine to request specific sections of large files • Files >50KB are truncated (first 25KB + last 25KB preserved)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository name (e.g., 'compact', 'midnight-js', 'example-counter')
pathYesFile path within repository
refNoBranch, tag, or commit SHA (default: main)
startLineNoStart line number (1-based, inclusive). Use to request specific sections.
endLineNoEnd line number (1-based, inclusive). Use with startLine for a range.
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, indicating a safe read operation. The description adds behavioral context beyond annotations, such as file truncation at 50KB (first 25KB + last 25KB preserved) and the ability to request specific line ranges, which helps the agent understand how the tool behaves.

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, using a single introductory sentence followed by a bulleted list of usage guidance. Every sentence adds value, and the structure is front-loaded with the core purpose. No wasted words.

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 (5 parameters, file retrieval with truncation) and no output schema, the description adequately covers return behavior (truncation), versioning (ref), and partial file retrieval (startLine/endLine). It could mention the format of the file content returned, but overall it's sufficiently complete.

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?

The input schema has 100% coverage with descriptions for all 5 parameters. The description adds value by explaining repository aliases ('compact', 'midnight-js', etc.) and clarifying the default value for 'ref' (main). It also offsets any ambiguity in schema descriptions by providing usage context.

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 starts with a clear verb+resource: 'Retrieve a specific file from Midnight repositories.' It distinguishes itself from sibling tools by mentioning alternatives like midnight-list-examples and midnight-search-*, 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 Guidelines5/5

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

The 'USAGE GUIDANCE' section explicitly states when to use alternatives ('Use midnight-list-examples first if you're unsure which file to get', 'For searching across files, use midnight-search-* tools instead') and provides clear guidance on parameters like ref, startLine/endLine, and file truncation behavior.

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/Olanetsoft/midnight-mcp'

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