Reference
lg_agents_draft_from_goal: Draft an agent from a goal
Draft an agent from a goal in plain language (a draft to review, not a live agent).
- Changes data: yes
- Credential scope:
agents:write(an API key's scopes, or what you allowed when connecting with OAuth) - Assistant level: an assistant at Read and draft or above
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
body | object (goal) | yes | |
body.goal | string | yes |
Example MCP call
A tools/call request to https://manage.restolayer.com/mcp:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lg_agents_draft_from_goal",
"arguments": {
"body": {
"goal": "Every Monday, tell the team which agent runs failed last week."
}
}
}
}Example REST call
The same thing over REST (POST /v1/agents/draft-from-goal):
curl -s -X POST "https://manage.restolayer.com/v1/agents/draft-from-goal" \
-H "Authorization: Bearer $LG_API_KEY" \
-H "Content-Type: application/json" \
-d '{"goal":"Every Monday, tell the team which agent runs failed last week."}'All tools: MCP tools. Connecting: connect your assistant.