Skip to content

Referência das ferramentas ​

INFO

Esta página é gerada a partir da lista de ferramentas do servidor MCP por scripts/docs_mcp.py. As descrições ficam em inglês: são as que o agente recebe de tools/list.

Toda ferramenta que trabalha num projeto recebe path: um arquivo .treegen.json, relativo à raiz do espaço de trabalho ou absoluto dentro de uma pasta permitida. As ferramentas de edição salvam o arquivo e devolvem a validação do resultado (ok, errors, warnings). Um erro de ferramenta (argumento ruim, caminho recusado, projeto inválido) volta como resultado normal marcado isError, com uma mensagem que diz como corrigir a chamada.

Todas as ferramentas ​

FerramentaO que fazTipo
workspace_infoWorkspace and server infosó leitura
list_nodesList node typessó leitura
describe_nodeDescribe a node typesó leitura
list_presetsList presets and speciessó leitura
list_libraryList saved projects in the user librarysó leitura
list_samplesList bundled sample projectssó leitura
new_projectCreate a project from a presetpode sobrescrever ou apagar
read_projectRead a projectsó leitura
validate_projectValidate a projectsó leitura
save_projectSave a project document or copypode sobrescrever ou apagar
set_project_settingsSet name, seed, export defaultsgrava
set_paramsSet node parametersgrava
add_nodeAdd a nodegrava
connectConnect two portsgrava
disconnectRemove a connectionpode sobrescrever ou apagar
remove_nodeRemove a nodepode sobrescrever ou apagar
apply_patchApply a JSON Patchpode sobrescrever ou apagar
build_projectBuild and report statssó leitura
render_previewRender a PNG previewgrava
export_projectExport model filespode sobrescrever ou apagar
import_infoInspect a mesh, manifest or texture packpode sobrescrever ou apagar
pack_texturesWrite a .pbrpack texture packpode sobrescrever ou apagar
pack_projectBundle a project into .treegenzpode sobrescrever ou apagar
unpack_projectUnpack a .treegenz bundlepode sobrescrever ou apagar
pbrgen_statusCheck for PBRGeneratorsó leitura
make_texturesMake a PBR texture set from an imagepode sobrescrever ou apagar
install_engine_packageInstall engine support (Unity, Godot, Unreal)pode sobrescrever ou apagar

Uma sessão típica: list_presets → new_project → describe_node → set_params → validate_project → build_project → render_preview → export_project.

Explorar ​

workspace_info ​

Workspace and server info · só leitura

Reports the folders this server may read and write, the user library and bundled samples folders, the export formats and the version. Call it first when you are unsure where files may go. Read-only.

Sem argumentos.

list_nodes ​

List node types · só leitura

Lists every node type of the tree graph with its category, one-line summary, input and output ports (typed: skeleton, foliage, volume, mesh, material) and how many parameters it has. A tree is a graph: generators (trunk, branches, space_colonization) make a skeleton of stems, modifiers (bend, prune, wobble, radius_rule) reshape it, meshers (bark_mesher, leaf_mesher) turn it into meshes, pbr_material adds materials and tree_output gathers everything for export. Use describe_node for the parameters of one type. Same data as askrgarden-cli nodes. Read-only.

ArgumentoTipoO que faz
categorystringOnly this category: generators, modifiers, foliage, meshers, materials, output.
language (padrão "en")en | pt | bothLanguage of labels and help: en, pt (Portuguese) or both.

describe_node ​

Describe a node type · só leitura

Full description of one node type: its ports and every parameter with kind (float, int, bool, enum, string, path, list, vec3, texture, object), default, minimum, maximum, enum options, whether it is 'varying' (accepts a number, {value, variance} or {curve, domain}), group, and help text in English and Portuguese. Read it before set_params or add_node so that values are valid. Lengths are meters, angles degrees. Same data as askrgarden-cli nodes -v and the node catalog resource. Read-only.

ArgumentoTipoO que faz
type (obrigatório)stringNode type, for example trunk, branches, leaves, bark_mesher, pbr_material, tree_output.
language (padrão "en")en | pt | bothLanguage of labels and help: en, pt (Portuguese) or both.

list_presets ​

List presets and species · só leitura

Lists the starting trees new_project can make: 5 base presets (broadleaf, conifer, colonized, birch, bush) and about 40 species (english_oak, scots_pine, royal_palm, weeping_willow, round_boxwood_ball...), each with category, bilingual label and researched height in meters (species only). Presets are colour-only: for textured trees see list_samples. Read-only.

ArgumentoTipoO que faz
categorystringOnly this category: broadleaf, conifer, palm, swamp, shrub, exotic.
kindbase | speciesbase presets or species.
language (padrão "en")en | pt | bothLanguage of labels and help: en, pt (Portuguese) or both.

list_library ​

List saved projects in the user library · só leitura

Lists .treegen.json files in the user's library folder (default Documents/AskrGarden, organised as trees|bushes|grass/<category>/<name>.treegen.json). Each row gives the path to pass to the other tools. Read-only.

ArgumentoTipoO que faz
querystringCase-insensitive text matched in the path, name and species.
limit (padrão 100)integerMaximum rows, 1-500.

list_samples ​

List bundled sample projects · só leitura

Lists the sample projects that ship with treegen (samples/ and the textured species library under samples/library/<category>/). They are read-only; start from one with save_project(path, copy_from=<its path>), which copies it into the workspace keeping its textures working. Read-only.

ArgumentoTipoO que faz
querystringCase-insensitive text matched in the path, name and species.
limit (padrão 100)integerMaximum rows, 1-500.

Projetos ​

new_project ​

Create a project from a preset · pode sobrescrever ou apagar

Writes a new .treegen.json from a preset or species (see list_presets), the same as askrgarden-cli new. The project is a complete, valid, buildable graph (colour materials, no textures). Refuses to replace an existing file unless overwrite is true. Next: read_project / set_params to tune it, build_project, render_preview, export_project.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
preset (padrão "broadleaf")stringPreset or species name from list_presets.
namestringProject (and tree) display name; default is the preset's.
seedintegerRandom seed (>= 0): the same graph with another seed is another tree of the same kind.
overwrite (padrão false)booleanReplace the file if it exists.

read_project ​

Read a project · só leitura

Reads a project file. view=summary (default) lists node ids, types, which params are explicitly set and the connections as 'node.port -> node.port', which is enough to plan edits. view=full returns the whole document JSON. With node, returns that node's stored params, its effective params (defaults filled in) and its connections. Read-only.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
view (padrão "summary")summary | fullsummary or full document.
nodestringNode id: return just this node in detail.

validate_project ​

Validate a project · só leitura

Checks a project file like askrgarden-cli validate: document shell, node types, parameter types and ranges, port names and value types, required inputs, cycles, tree_output presence, absolute paths. Returns blocking errors (each with node id and param path) and warnings (mostly nodes that do not reach tree_output). A project with errors cannot be built or exported. Read-only, never fails because the project is invalid: read ok and errors.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).

save_project ​

Save a project document or copy · pode sobrescrever ou apagar

Writes a project file in canonical form. Either doc (a complete project object, for example one you composed or fetched with read_project view=full) or copy_from (an existing project, such as a textured sample from list_samples; relative texture paths are rewritten to keep working). Refuses a document with blocking errors unless allow_invalid, and refuses to replace a file unless overwrite.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
docobjectComplete project document (format 'treegen', schema_version, graph). Not with copy_from.
copy_fromstringExisting project to copy (any readable folder, including samples). Not with doc.
namestringNew display name (copy_from only).
overwrite (padrão false)booleanReplace an existing file.
allow_invalid (padrão false)booleanSave even with blocking errors.

set_project_settings ​

Set name, seed, export defaults · grava

Changes the project-level fields and saves the file: name, seed (the global random seed; another seed grows another tree from the same graph) and export defaults (for example {default_format: 'fbx'}, merged into the existing export block). Per-tree settings (LODs, wind data, impostor) are params of the tree_output node: use set_params.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
namestringProject name.
seedintegerGlobal seed, >= 0.
exportobjectExport defaults to merge.

Editar o grafo de nodes ​

set_params ​

Set node parameters · grava

Sets one or more parameters of one node and saves the file. Every name and value is checked against the node registry (type, range, enum options) before anything is written, so a wrong call changes nothing. Values: numbers; booleans; enum strings; [x, y, z]; for 'varying' params a number, {value, variance} or {curve: [[t, v], ...], domain}; for object params (tree_output.impostor) the keys you give are merged into the existing object; null resets a param to its default. Lengths are meters, angles degrees. Use describe_node to see what is valid. Returns what changed and the validation of the saved project.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
node (obrigatório)stringNode id (see read_project), for example 'trunk' or 'out'.
params (obrigatório)objectParam name -> new value.

add_node ​

Add a node · grava

Adds a node of the given type to the graph and saves the file. The node starts unconnected (a detached node only yields a warning). Optional id (letters, digits, _ and -; generated from the type when omitted) and initial params, validated like set_params. Returns the node id and its ports; wire it with connect. tree_output is unique per project.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
type (obrigatório)stringNode type from list_nodes.
idstringNode id; unique in the project.
paramsobjectInitial param values (others use defaults).

connect ​

Connect two ports · grava

Adds an edge from an output port to an input port ('node_id.port_name' both) and saves the file. Ports must exist and have the same value type (skeleton, foliage, volume, mesh, material). An input that takes one connection and is already fed is refused unless replace is true. Example: from 'twigs.skeleton', to 'radius.skeleton'.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
from (obrigatório)stringSource output, 'node.port'.
to (obrigatório)stringTarget input, 'node.port'.
replace (padrão false)booleanReplace the existing connection of a single-connection input.

disconnect ​

Remove a connection · pode sobrescrever ou apagar

Removes the edge(s) into an input port and saves the file. With from, removes only that edge; without it, every edge into the input (needed for multi-connection inputs such as tree_output.meshes).

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
to (obrigatório)stringTarget input, 'node.port'.
fromstringSource output 'node.port'; omit to remove all edges into the input.

remove_node ​

Remove a node · pode sobrescrever ou apagar

Deletes a node and every edge touching it, and saves the file. Nodes that fed it keep their other connections. Refuses to remove tree_output unless force is true.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
node (obrigatório)stringNode id.
force (padrão false)booleanAllow removing tree_output.

apply_patch ​

Apply a JSON Patch · pode sobrescrever ou apagar

Generic fallback edit: applies RFC 6902 JSON Patch operations (add, remove, replace, move, copy, test) to the project document, all or nothing. Paths are JSON Pointers into the document, for example /graph/nodes/0/params/length or /graph/edges/- (append). Prefer set_params, add_node, connect, disconnect and remove_node: they check names, ranges and port types and are much harder to get wrong. Refuses a result that is not a treegen project; use dry_run to see the validation without saving.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
operations (obrigatório)object[]Operations applied in order.
dry_run (padrão false)booleanValidate the patched document without saving.

Gerar, ver e exportar ​

build_project ​

Build and report stats · só leitura

Evaluates the graph for every LOD and reports what the tree is, like askrgarden-cli build: height, crown radius and trunk radius in meters, bounds, stem count, leaf cards, triangles and vertices per LOD with screen sizes, material names and build warnings. Writes no files. Use it after edits to check size and budget; use export_project to get files. Errors if the project has blocking validation errors. The impostor is not baked unless impostor is true (slow: seconds).

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
impostor (padrão false)booleanAlso bake the impostor and report its metadata (slow).

render_preview ​

Render a PNG preview · grava

Renders a PNG picture of the tree so you can look at it: one orthographic three-quarter view from slightly above, on a transparent background, using the lowest-detail LOD that still has leaves, with textures and alpha masks. Deterministic. Returned as image content; save_to also writes the PNG into an allowed folder. About 0.2-1 s at 256 px. Use after edits to judge shape and proportions (height and crown numbers come from build_project).

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
size (padrão 256)integerSquare image side in pixels, 64-1024.
save_tostringAlso write the PNG here (must end with .png, inside an allowed folder).

export_project ​

Export model files · pode sobrescrever ou apagar

Builds the tree and writes engine-ready files, like askrgarden-cli export: GLB/glTF, FBX (binary 7.4), OBJ+MTL and USDA, every LOD, with wind vertex data, PBR textures bound to bark and leaves, and a <name>_export.json manifest. Options: atlas merges all materials into one material and texture set (one mesh per LOD); cards adds crossed textured vegetation planes (planes 1 = billboard; cards.only writes just those); impostor bakes the billboard atlas as the last LOD (default: as the tree_output node says; baking takes seconds); textures=false writes no texture files (factors only, no impostor). Units are meters, +Y up (writers convert per format). Overwrites files of the same name in out_dir. Default out_dir: <root>/out/exports/<project name>.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
formatsstring[]Formats to write; default: the project's export.default_format, else glb.
all_formats (padrão false)booleanWrite every format (overrides formats).
out_dirstringOutput folder, inside an allowed folder.
textures (padrão true)booleanWrite texture files and bind them.
atlas (padrão false)booleanMerge all materials into one atlas material.
cardsobjectAlso write vegetation cards.
impostorbooleantrue: bake and export the impostor even if the node has it off; false: leave it out; omit: follow the tree_output node.
fbx_via (padrão "native")native | blenderFBX writer: built-in native, or blender (needs Blender installed).

Arquivos e pacotes ​

import_info ​

Inspect a mesh, manifest or texture pack · pode sobrescrever ou apagar

Inspects a file without changing any project, like askrgarden-cli import: a mesh (.glb .gltf .obj .fbx) -> vertices, triangles, bounds; a PBRGenerator <prefix>_manifest.json -> the material slots it maps to; a .pbrpack / .zip texture pack -> name, kind and the pbr_material params it would set. With extract (packs only) the pack is unpacked into extract/<pack name> and the params to put on a pbr_material node are returned.

ArgumentoTipoO que faz
path (obrigatório)stringFile to inspect (inside an allowed folder, samples included).
projectstringProject file that manifest paths are relative to (default: workspace root).
extractstringPack only: folder to unpack into (must be writable).

pack_textures ​

Write a .pbrpack texture pack · pode sobrescrever ou apagar

Bundles a PBRGenerator <prefix>_manifest.json and the maps it lists (they sit beside it) into one .pbrpack zip, like askrgarden-cli pack-textures, with an optional material descriptor (tile size in meters, alpha mode, cutoff, double sided). Deterministic bytes.

ArgumentoTipoO que faz
manifest (obrigatório)stringPath to <prefix>_manifest.json.
outstringOutput .pbrpack (default beside the manifest).
kind (padrão "generic")bark | leaf | ground | genericWhat the pack is for.
namestringPack and material name (default: the manifest's output prefix).
tile_size_mnumberPhysical size of one texture tile in meters.
alpha_modeopaque | maskopaque or mask.
alpha_cutoffnumberAlpha cutoff for mask, 0-1.
double_sidedbooleanRender both faces.

pack_project ​

Bundle a project into .treegenz · pode sobrescrever ou apagar

Zips a project and every texture, manifest and mesh it references into one .treegenz file you can move to another computer, like askrgarden-cli pack. Missing files are skipped with a note on stderr.

ArgumentoTipoO que faz
path (obrigatório)stringProject file, name ending in .treegen.json. A relative path starts at the workspace root; an absolute path must be inside an allowed folder (see workspace_info).
outstringOutput .treegenz (default beside the project).

unpack_project ​

Unpack a .treegenz bundle · pode sobrescrever ou apagar

Unzips a .treegenz into a folder and returns the project file inside, like askrgarden-cli unpack. Unsafe paths in the archive are refused.

ArgumentoTipoO que faz
path (obrigatório)stringThe .treegenz file.
outstringFolder to unpack into (default: beside the bundle, named after it).

Texturas com o PBrokkR ​

pbrgen_status ​

Check for PBRGenerator · só leitura

Reports whether the sibling tool PBRGenerator (makes PBR texture sets from photos) is installed and found, its version, the command used, the texture kinds and the defaults each kind implies. Same as askrgarden-cli pbrgen. Call it before make_textures; when found is false the message says how to point treegen at it (the editor setting or the TREEGEN_PBRGEN environment variable). Read-only.

Sem argumentos.

make_textures ​

Make a PBR texture set from an image · pode sobrescrever ou apagar

Runs PBRGenerator on an image (a photo, or a height or normal map) and unpacks the resulting PBR set into <project folder>/textures/<name>/ (or out/<name>/), like askrgarden-cli make-textures. Returns the manifest and the pbr_material params that bind the set (feed them to set_params on a pbr_material node). Slow: seconds to minutes. Needs PBRGenerator (check pbrgen_status). Overwrites a set of the same name.

ArgumentoTipoO que faz
image (obrigatório)stringSource image (png, jpg, tif...), inside an allowed folder.
kind (padrão "generic")bark | leaf | ground | genericWhat the set is for; chooses material defaults.
namestringMaterial and folder name (default: the image name).
projectstringProject file: the set goes into the textures folder beside it. Without it, into <workspace root>/textures.
outstringTextures folder to write into (the set goes to out/<name>/); overrides the project's.
input_kind (padrão "photo")photo | height | normalWhat the image is.
presetstringA PBRGenerator preset name.
sizeintegerWork at this square size in pixels.
tile_size_mnumberPhysical size of one tile in meters.
seam_modestringHow a photo is made to tile (for example periodic; default depends on kind).
normal_strengthnumberNormal map strength.
timeout (padrão 300)numberSeconds before the run is stopped.

Pacotes de engine ​

install_engine_package ​

Install engine support (Unity, Godot, Unreal) · pode sobrescrever ou apagar

Installs the AskrGarden support package for a game engine (shaders, wind component, importer that set up exported trees by themselves) into an engine project, into any folder, or as a zip; same as treegen engine-package. dest must be an existing folder inside an allowed folder (see workspace_info). A Unity project (Assets + Packages) receives Packages/com.askrgarden.unity, a Godot project (project.godot) addons/askrgarden, an Unreal project (.uproject) Plugins/AskrGarden; any other folder gets the package folder inside it. With zip=true it writes AskrGarden-<Engine>-<version>.zip into dest instead (deterministic). An older install is replaced: files that no longer exist in the package are removed, nothing outside the package folder is touched. Returns the mode (project, folder, zip), the path written, the file count, whether a project was detected and a next-step hint to relay to the user.

ArgumentoTipoO que faz
engine (obrigatório)unity | godot | unrealWhich engine.
dest (obrigatório)stringExisting folder to install into (the engine project folder, or any folder), inside an allowed folder. With zip=true the folder for the zip file.
zip (padrão false)booleanWrite a zip file into dest instead of copying the package.
overwrite (padrão true)booleanReplace an existing install or zip (false: refuse when it exists).

Recursos ​

Documentos só de leitura que o agente lê sem chamar ferramenta:

URIO que faz
treegen://guidefluxo de trabalho e convenções para agentes
treegen://nodes/catalogo catálogo completo de nodes (JSON)
treegen://nodes/{type}um tipo de node, com um modelo (JSON)
treegen://schema/projecto JSON Schema do arquivo de projeto
treegen://samples/<file>um documento de projeto de exemplo

Prompts ​

Instruções prontas que o cliente pode oferecer ao usuário (por exemplo como comandos com /):

PromptO que fazArgumentos
build_tree_from_descriptionGuides the model to pick a preset, tune it to a description and export it.description (obrigatório), path (obrigatório), formats
tune_treeGuides the model to change an existing project according to feedback, checking each step.path (obrigatório), feedback (obrigatório)