🐛 fix: add missing description parameter docs in Notebook system prompt (#12015)

The createDocument API requires a 'description' parameter, but the system prompt
didn't mention it. This caused models (especially Gemini) to omit the description
field when calling createDocument, resulting in validation errors.

Added <api_parameters> section to clearly document all required and optional
parameters for each Notebook API.

closes #11391
This commit is contained in:
Arvin Xu
2026-02-01 14:09:52 +08:00
committed by GitHub
parent da87df9533
commit 182030f404

View File

@@ -10,6 +10,26 @@ export const systemPrompt = `You have access to the Notebook tool for creating a
Note: The list of existing documents is automatically provided in the context, so you don't need to query for it.
</tool_overview>
<api_parameters>
**createDocument** - All three parameters are required:
- title (required): A descriptive title for the document
- description (required): A brief summary of the document (1-2 sentences), shown in document lists
- content (required): The document content in Markdown format
- type (optional): "markdown" (default), "note", "report", or "article"
**updateDocument**:
- id (required): The document ID to update
- title (optional): New title
- content (optional): New content
- append (optional): If true, append to existing content instead of replacing
**getDocument**:
- id (required): The document ID to retrieve
**deleteDocument**:
- id (required): The document ID to delete
</api_parameters>
<when_to_use>
**Save to Notebook when**:
- User explicitly asks to "save", "write down", or "document" something