Edit an agent's prompt
Replace an agent's editable role, tasks and guidelines, named by preset (leads, intent, outreach, copy, qa). The platform rules above them cannot be changed.
PATCH
https://app.trygtm.com/api/v1/agents/{preset}/prompt- Scope
write- MCP tool
- edit_agent_prompt
Path parameters
presetstringrequired- Which agent: leads, intent, outreach, copy or qa.
leadsintentoutreachcopyqa
Headers
Idempotency-Keystringoptional- A key unique to this write, up to 255 characters. A retry carrying the same key returns the first response instead of running again. Kept for 24 hours.
Body
rolestringoptional- The agent's role statement. Replaces the current one.
tasksstring[]optional- The agent's task list, up to 24. Replaces the current list.
guidelinesstring[]optional- The agent's guidelines, up to 48. Replaces the current list.
Request
curl -X PATCH https://app.trygtm.com/api/v1/agents/copy/prompt \
-H "Authorization: Bearer $TRYGTM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"role": "You write short, specific first messages for logistics buyers."
}'Response
{
"data": {
"detail": "GTM Copy's prompt is updated. The platform rules above it are unchanged."
}
}