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 matchesextensionsis 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 inomitted_fileswith reasonbyte_cap_reached. For larger pulls, pass a higher value explicitly.Files matching no
extensionsfilter are listed inomitted_fileswith reasonextension_not_in_filter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | No | Concrete version (preferred) or "latest". Always surfaced back in `resolved_version`. | latest |
| extensions | No | List of file suffixes (with dot) to include. Defaults to NetLogo + common ABM languages + .md + .txt. | |
| identifier | Yes | Full model UUID. | |
| max_total_bytes | No | Cap on total returned content. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |