get_algorithm
Fetch the source code or README for a generative art algorithm from the Logic Lab repository by specifying its manifest-relative path.
Instructions
Return the source text of a Logic Lab .py file or README.md.
This tool is read-only: it reads only .py files and README.md files within
the repository boundary. File creation, editing, deletion, and shell execution
are not available through this server.
Returns a dict with:
- path (str): normalized manifest-relative path
- content (str): file text, possibly truncated
- truncated (bool): true when the file exceeded max_chars
- notice (str | null): truncation message with the current limit and maximum,
or null when content was not truncated
Raises AccessError when the path escapes the repository root, points to a
non-existent file, or refers to a disallowed file type (not .py or README.md).
Call get_algorithm_summary first to confirm relevance before fetching full
source. Call search_algorithms or get_manifest to discover valid paths.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Manifest-relative path to a .py or README.md file within the Logic Lab repository (e.g. 'physics/wave/wave.py' or 'fractals/mandelbrot/README.md'). Must be a relative path — absolute paths are rejected. Paths that escape the repository root are rejected. Use search_algorithms or get_manifest to discover valid paths. | |
| max_chars | No | Maximum characters of source text to return. Accepts integers in the range 1–20000. Default: 12000. When the file exceeds this limit the response sets truncated=true and includes a notice. Increase this value for large source files, up to the hard limit of 20000. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||