maestro/docs/tools/readusertemplate.md
clade 7049a874f3 feat: initial public release (MAESTRO v0.1.0)
Open-source release of MAESTRO, an agent orchestration platform that runs
LLM-driven tasks through sandboxed tools, with a web UI. Apache-2.0.
See README.md and docs/ (getting-started, configuration, architecture).
2026-06-03 04:01:14 +00:00

2.1 KiB

ReadUserTemplate

Loads a template file from the caller's templates/ subdir (data/users/{userId}/templates/).

Overview

Templates are plain Markdown files the user stores in their templates/ folder via the UI. Unlike memory/ entries, frontmatter is optional — a template can be pure Markdown prose with no YAML header at all.

Use this tool when the user says "use the weekly-report template" or "follow the api-error-email boilerplate" — call ReadUserTemplate, read the shape, then adapt it to the task at hand.


Usage

{ "name": "weekly-report" }

Or with the .md extension (both forms work):

{ "name": "weekly-report.md" }

Response example (no frontmatter):

# Template: weekly-report

## Body
# Weekly Report

Fill in this week's highlights here.

Response example (with frontmatter):

# Template: api-error-email

## Frontmatter
title: "API Error Email"
audience: "external"

## Body
Dear customer,

We apologize for the inconvenience.

Parameters

Parameter Type Required Description
name string Yes Template filename, with or without .md extension (max 128 chars)

Error cases

  • Returns an error if the template does not exist in templates/.
  • Returns an error if no user is authenticated.
  • Returns an error if name contains path traversal characters or slashes.

Use cases

  • Weekly / monthly report boilerplate: ReadUserTemplate({ name: "weekly-report" }) → fill in stats.
  • Email canned responses: ReadUserTemplate({ name: "api-error-email" }) → personalise and send.
  • Code boilerplate: ReadUserTemplate({ name: "react-component" }) → generate a new component.

  • ListUserAssets({ kind: "templates" }) — see what templates exist before reading one.
  • ReadUserMemory — for structured facts/preferences (requires frontmatter).
  • RunUserScript — for executable Node/Playwright scripts stored in scripts/ / browser-macros/.
  • This tool is a META_TOOL — no need to add it to allowed_tools in piece YAML.