mirror of
https://github.com/penpot/penpot-mcp.git
synced 2026-04-25 11:18:37 +00:00
Improve prompts
This commit is contained in:
parent
649506cc9e
commit
cf5231db66
@ -4,6 +4,10 @@
|
||||
initial_instructions: |
|
||||
You have access to Penpot tools in order to interact with a Penpot design project directly.
|
||||
As a precondition, the user must connect the Penpot design project to the MCP server using the Penpot MCP Plugin.
|
||||
|
||||
IMPORTANT: When transferring styles from a Penpot design to code, make sure that you strictly adhere to the design.
|
||||
NEVER make assumptions about missing values and don't get overly creative (e.g. don't pick your own colours and stick to
|
||||
non-creative defaults such as white/black if you are lacking information).
|
||||
|
||||
A Penpot project contains shapes and more general design elements (which we shall collectively refer to as "elements").
|
||||
|
||||
@ -26,7 +30,7 @@ initial_instructions: |
|
||||
* The `Shape` type is a union type. `ShapeBase` is a base type most shapes build upon.
|
||||
Any given shape contains information on the concrete type via its `type` field.
|
||||
|
||||
Another useful object is the `penpotUtils` object (which not part of the official API). It provides:
|
||||
Another useful object is the `penpotUtils` object (which is not part of the official API). It provides:
|
||||
* shapeStructure(shape: Shape, maxDepth: number | undefined = undefined): object
|
||||
Generates an overview structure of the given shape,
|
||||
providing the shape's id, name and type, and recursively the children's structure.
|
||||
|
||||
@ -52,8 +52,8 @@ export class ExecuteCodeTool extends Tool<ExecuteCodeArgs> {
|
||||
"instead of just a fleeting variable).\n" +
|
||||
"The tool call returns the value of the concluding `return` statement, if any.\n" +
|
||||
"Any output that you generate via the `console` object will be returned to you; so you may use this" +
|
||||
"to track what your code is doing, but you should only do so only if there is an actual need for this! " +
|
||||
"IMPORTANT: Don't use logging prematurely!\n" +
|
||||
"to track what your code is doing, but you should only do so only if there is an ACTUAL NEED for this! " +
|
||||
"VERY IMPORTANT: Don't use logging prematurely! NEVER log the data you are returning, as you will otherwise receive it twice!\n" +
|
||||
"VERY IMPORTANT: In general, try a simple approach first, and only if it fails, try more complex code that involves " +
|
||||
"handling different cases (in particular error cases) and that applies logging."
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user