Skip to main content
Glama

read_comses_files

Retrieve text contents of source and documentation files from a previously downloaded COMSES model. Files are filtered by extension and capped at a configurable byte limit.

Instructions

Return text contents of source and documentation files from a downloaded COMSES model.

The model MUST already be downloaded by open_comses_model or download_comses_model. If the cache is absent, this tool returns an error telling the AI to call one of those first.

The AI should pass the resolved_version it captured from open_comses_model — not the literal string "latest" — or it risks inspecting a different cache slot than the model it just loaded. When version="latest" is passed, this tool calls the COMSES API to resolve it (so it works standalone) and surfaces the concrete version in the resolved_version field of the response.

Behavior:

  • Files are UTF-8 decoded with errors="replace" so binary junk never aborts the call. Every file that matches extensions is returned as a string (may contain replacement characters for non-text bytes).

  • Files are included in priority order: ODD docs → NetLogo source → other code → other .md/.txt → everything else matching extensions.

  • Total body is capped at max_total_bytes (default 50 KB — sized to fit in a single conversational-LLM tool response). When the cap is hit mid-file, that file is truncated at a line boundary; subsequent files are listed in omitted_files with reason byte_cap_reached. For larger pulls, pass a higher value explicitly.

  • Files matching no extensions filter are listed in omitted_files with reason extension_not_in_filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionNoConcrete version (preferred) or "latest". Always surfaced back in `resolved_version`.latest
extensionsNoList of file suffixes (with dot) to include. Defaults to NetLogo + common ABM languages + .md + .txt.
identifierYesFull model UUID.
max_total_bytesNoCap on total returned content.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, description fully discloses behavior: UTF-8 decoding with error handling, file priority order, byte cap and truncation, extension filtering, and version resolution. No behavioral gaps.

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?

Front-loaded with core purpose, then logically structured into prerequisites, important notes, and bullet-pointed behavior. Every sentence adds value without redundancy.

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 output schema exists, description doesn't need to detail return format, but still mentions key response fields. Covers prerequisites, all behavioral details, error conditions, and parameter usage comprehensively.

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?

Schema coverage is 100%, and description adds significant context: explains version resolution and importance of concrete version, defaults for extensions, and cap behavior for max_total_bytes. Each parameter is enriched beyond schema.

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?

First sentence clearly states the tool returns text contents of files from a downloaded model. Differentiates from siblings by specifying prerequisite of a prior download operation.

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?

Explicitly states model must be downloaded first via open_comses_model or download_comses_model, and advises using resolved_version from that call. Clearly tells when to use and prerequisites.

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/Razee4315/NetLogo-MCP'

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