get_constraints
Retrieve layout constraints and design guardrails from a Penpot file to prevent layout overflow and brand inconsistency before UI generation.
Instructions
Get layout constraints and design guardrails for a Penpot file. Returns spacing scale, color tokens, typography scale, and MUST/MUST NOT rules. Call this BEFORE generating any UI to avoid layout overflow and brand inconsistency.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fileId": "<fileId>"
},
"name": "get_constraints"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | Penpot file ID | |
| pageId | No | Specific page ID (optional, defaults to all) |