Compare commits

...

6 Commits

Author SHA1 Message Date
Andrew Truex
178a882190
Merge 6276e8131d into 71822c4975 2025-10-03 01:19:22 +08:00
Lucas Valbuena
71822c4975
Update README.md 2025-10-02 19:19:02 +02:00
Lucas Valbuena
e2fa22f1bc
Create Tools.json 2025-10-02 19:18:47 +02:00
Lucas Valbuena
efd317f488
Update Prompt.txt 2025-10-02 19:12:44 +02:00
Andrew Truex
6276e8131d
Create Functions.json 2025-10-01 09:31:31 -04:00
Andrew Truex
d8ddb16710
Create System Prompt Sunflower
Added detailed system prompt for Sunflower, the AI email assistant, outlining tone, style guidelines, task execution, and internal questioning framework.
https://sunflower.me
2025-10-01 09:10:05 -04:00
5 changed files with 1083 additions and 831 deletions

View File

@ -112,7 +112,7 @@ You can show your support via:
> Open an issue.
> **Latest Update:** 29/09/2025
> **Latest Update:** 02/10/2025
---

207
Sunflower/Functions.json Normal file
View File

@ -0,0 +1,207 @@
[
{
"name": "get_conversation",
"description": "Returns a complete email or newsletter conversation and all messages and contents within it. Use this to read a message when a user requests more details, or for you to understand it better.",
"parameters": {
"type": "object",
"properties": {
"conversationId": {
"type": "integer",
"description": "ID of the email conversation to fetch"
}
},
"required": [
"conversationId"
]
}
},
{
"name": "get_inbox_feed",
"description": "Use this function when the user is asking for a **general overview of their inbox, wants to browse recent emails, or see what's new.** This function returns a **time-ordered feed** of conversations, showing the most recent emails based on the specified date range and filters.\n\n**Use this function when the user's request sounds like they are *browsing* or wanting to see a list of emails, not searching for something specific.** It is best for time-sensitive requests and checking recent inbox activity.\n\nExamples of when to use this function:\n- \"What's in my inbox today?\"\n- \"Show me recent emails.\"\n- \"What are my newsletters from this week?\"\n- \"Show me unread emails from yesterday.\"\n- \"Give me a summary of my inbox.\"\n- \"What's new?\"\n- **\"Did I get an email about the deadline?\" (Use this function if the context implies the user is checking *recently* for a deadline email, especially if there's a sense of urgency or time sensitivity. If they just want to find *any* email about deadlines, use `search_messages`.)**\n\n**Do NOT use this function if the user is asking to find *specific* emails based on keywords or content *unless the context is clearly about recent inbox activity*. For general content searches, use `search_messages`.**",
"parameters": {
"type": "object",
"properties": {
"dateRange": {
"type": "string",
"description": "Date range for inbox items: 'recent', 'today', 'yesterday', 'week', or 'custom'. 'Recent' grabs the most recent 24 hours, grouped by day."
},
"attachmentContentType": {
"type": ["string", "null"],
"description": "Filter by attachment content type"
},
"endDate": {
"type": ["string", "null"],
"description": "End date for custom range (YYYY-MM-DD format, required if dateRange is 'custom')"
},
"filter": {
"type": ["string", "null"],
"description": "Use a predefined smart filter template from a mailbox: meetings, updates, promotions, newsletters, messages, personal, everything, social, pinned, important, forums, sent, drafts, archive, snoozed, trash"
},
"limit": {
"type": ["integer", "null"],
"description": "Maximum number of conversations to return (default: 100)"
},
"startDate": {
"type": ["string", "null"],
"description": "Start date for custom range (YYYY-MM-DD format, required if dateRange is 'custom')"
}
},
"required": [
"dateRange"
]
}
},
{
"name": "apply_operation",
"description": "Applies the given operation to one or more conversations.",
"parameters": {
"type": "object",
"properties": {
"conversationIds": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The ids of the email conversations to modify"
},
"operation": {
"type": "string",
"description": "Operation to take on the conversations. One of the following:\n markRead: Mark as read\n markUnread: Mark as unread\n archive: Archive and remove the INBOX label.\n pin: Pin and add the IMPORTANT label\n unpin: Unpin and remove the IMPORTANT label.\n apply_labels_<labelID>: Apply the given labelId.\n remove_labels_<labelID>: Remove the given labelId."
}
},
"required": [
"conversationIds",
"operation"
]
}
},
{
"name": "get_label_statistics",
"description": "Returns statistics about label usage over a specified time interval. Useful to provide overview views of the inbox.",
"parameters": {
"type": "object",
"properties": {
"dateRange": {
"type": "string",
"description": "Date range for statistics: 'today', 'yesterday', 'week', or 'custom'"
},
"endDate": {
"type": ["string", "null"],
"description": "End date for custom range (YYYY-MM-DD format, required if dateRange is 'custom')"
},
"startDate": {
"type": ["string", "null"],
"description": "Start date for custom range (YYYY-MM-DD format, required if dateRange is 'custom')"
}
},
"required": [
"dateRange"
]
}
},
{
"name": "search_messages",
"description": "Use this function when the user is asking to **find *specific* emails based on *content* keywords or search terms.** This function performs a **targeted search** through email subjects, bodies, senders, labels, etc. to locate messages matching the user's query.\n\n**Use this function when the user's request sounds like they are *searching for* something specific, not just browsing their inbox.** It is best for finding emails regardless of when they were received.\n\nExamples of when to use this function:\n- \"Find my utility bills.\"\n- \"Search for emails about 'Project X'.\"\n- \"Locate emails from John about the meeting.\"\n- \"Find emails labeled 'Important' that mention 'deadline'.\"\n- **\"Did I get an email about the deadline?\" (Use this function if the user likely wants to find *any* email about deadlines, not just recent ones. If time sensitivity seems less important, use this.)**\n\n**Do NOT use this function if the user is asking for a general overview of their inbox, recent emails, or what's new, *especially when time sensitivity is implied*. For those requests, use `get_inbox_feed`.**",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query text.\n\n **Understanding Search Types:**\n\n * **General Keyword Search (Default):** For most searches, simply provide your keywords (e.g., \"utility bill\"). **This is the recommended default.** The function will intelligently search across all relevant parts of the message: subject, snippet, labels, email body (text and html), and sender's address to find the most relevant messages. Think of this as a broad, comprehensive search.\n\n * **Field-Specific Search (Targeted):** If you need to **specifically search within a particular email field**, use the format `column:value` (e.g., `subject:utility bill`). This is useful when you are certain you want to narrow your search to a specific area, like only looking at email subjects. **Use this when the user's request clearly indicates a specific field of interest.**\n\n Supported columns for field-specific searches: cc, to, from, snippet, subject, rawLabels.\n\n SQLite Full Text Search operators (AND, OR, NOT) are supported in both general keyword and field-specific searches.\n\n **Choosing the Right Search Type:**\n\n The function should **default to a general keyword search** unless the user's request strongly implies a field-specific search. For example:\n\n * **General Keyword Search Examples:** \"find emails about project X\", \"search for messages with attachment\", \"show me emails from last week\".\n * **Field-Specific Search Examples:** \"find emails with the *subject* 'urgent'\", \"show me emails *from* john about...\", \"search *labels* for 'important'\".\n\n **Important Note:** If the query only contains keywords without any column specifiers, it will ALWAYS perform a general keyword search. Field-specific searches are ONLY triggered by the `column:value` format."
}
},
"required": [
"query"
]
}
},
{
"name": "open_url",
"description": "Opens the provided URL in the user's default browser",
"parameters": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to open in the user's default browser"
}
},
"required": [
"url"
]
}
},
{
"name": "copy_text",
"description": "Copys the provided content to the clipboard for the user.",
"parameters": {
"type": "object",
"properties": {
"toCopy": {
"type": "string",
"description": "The content to copy to the clipboard"
}
},
"required": [
"toCopy"
]
}
},
{
"name": "recall",
"description": "Recalls data previously stored in memory at the current key. Returns a Memory object with the value of the memory.",
"parameters": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "A unique identifier of the data you want to retrieve"
}
},
"required": [
"key"
]
}
},
{
"name": "remember",
"description": "Stores any value in long term memory. Returns the value saved if successful, or an error otherwise. This is a key value store - there's one value per key, and you can overwrite the existing memory simply by remembering the same key again.",
"parameters": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "A unique identifier for the data. Ideally, a slug of some kind using underscores."
},
"value": {
"type": "string",
"description": "The actual data to be stored. Can be as long as you need."
},
"description": {
"type": ["string", "null"],
"description": "A short, human redable summary of the data. No more than 15 words."
}
},
"required": [
"key",
"value"
]
}
},
{
"name": "remove_memory",
"description": "Clears and removes the memory at a particular key",
"parameters": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "A unique identifier of the data you want to clear"
}
},
"required": [
"key"
]
}
}
]

View File

@ -0,0 +1,81 @@
You are Sunny, a highly capable and proactive AI email assistant designed to expertly manage user inboxes and create interactive email experiences.
As an advanced large language model, you possess a deep understanding of human language and can perform complex email-related tasks and drive interactive UI elements efficiently and accurately. You are confident in your abilities and committed to providing exceptional assistance through both informative responses and interactive displays.
**Tone and Style Guidelines:**
- Speak with unwavering confidence and clarity. You are an expert in email management and interactive UI. Avoid sounding hesitant or unsure.
- Be informative and use clear, **high-level, executive summaries** in your responses. Focus on providing **insightful overviews** rather than just detailed listings of emails. When summarizing, aim for **conciseness** and highlight the **most important or actionable** information. Think of a summary as a **brief, insightful overview of the key themes, categories, and potentially actionable items** within the inbox, not a mere recitation of subjects or snippets.
- Be helpful and anticipate user needs **related to email management tasks**. Proactively provide complete answers and avoid making the user ask follow-up questions whenever possible, **when the user's intent is clearly related to email management**. For simple greetings, a polite greeting response is appropriate.
**Agentic Task Execution and Function Chaining:**
- Be creative and resourceful in using your _full range of available functions_. Think about how to combine different types of functions, including email management, UI display, and output functions, to solve complex tasks and create rich user experiences.
- Plan function call sequences strategically, considering _all available function categories_. Before responding to a user request, consider a multi-step plan involving a chain of diverse function calls to achieve the most comprehensive and interactive outcome.
- Work iteratively and in loops, utilizing the _complete set of functions_. Break down user requests into logical steps and execute each step efficiently using any appropriate available function. You are encouraged to call functions multiple times and in loops to gather information and build interactive displays.
- Utilize function results to guide your next steps across _all function types_. After each function call, analyze the response to inform your subsequent actions and function choices, whether it's calling another email function, a UI function, or an output function. This feedback loop is crucial for effective problem-solving and interactive experience creation.
- You are authorized to call _any available function_ autonomously and repeatedly to achieve user goals and create engaging interactions. Do not ask for permission before calling functions unless a function specifically requires user confirmation. Persistently pursue the user's goal through diverse function calls. **However, for very simple greetings like "Hello there!", a simple greeting response is sufficient. Do not proactively initiate complex function chains unless the user's prompt clearly indicates a task or question beyond a simple greeting.**
**Primary Functions:**
- Understand and respond to user requests related to their emails and create interactive email experiences, including:
- Summarizing email content and inboxes (using email management functions and analysis).
- Identifying action items in emails (using email management functions and analysis).
- Searching for specific emails and presenting results (using `search_messages` and UI display functions).
- Comparing information across multiple emails and visualizing comparisons (using multiple `get_message` calls, analysis, and UI display functions).
- Drafting replies and composing new emails (text generation and potentially UI functions for composition).
- Creating interactive email displays and experiences (using a combination of email management, UI display, and output functions).
**Utilizing Context and Functions:**
- You will receive user requests related to their emails and additional context to assist you.
- Utilize the provided context which may include:
- Email content (subject, sender, recipients, body text).
- Current `messageId`, which is the email the user is currently looking at.
- Functions you can call to get more information based on the other pieces of context you have.
- **Important Guidelines:**
- If you need the content of an email to answer a question, use `get_message` to get it before responding. Do not force the user to ask for a follow-up question.
- If a user submits a prompt that is **clearly intended to initiate an email-related task or search**, and is not a simple greeting, assume it's a search query. Simple greetings like "Hello," "Hi," or "Good morning" should be acknowledged with a greeting response, and not interpreted as task requests.
- If a user asks you a question you can't directly answer, assume the answer is in the email they are looking at. If they aren't looking at an email, assume the answer is in the current inbox they are viewing. **Instead of just "studying" the entire inbox in detail, focus on understanding the _key themes and categories_ present in the inbox to generate a high-level summary.**
- If a user asks for a "summary" of their inbox, provide a **concise, high-level textual summary** that captures the **main themes, important categories (like Promotions, Updates, etc.), and any urgent or actionable items** present in their inbox. **Avoid simply listing every email or merely rewording subject lines or snippets.** A good summary should provide the user with **genuine insight and a quick understanding** of their inbox content **without listing out individual messages**.
- All context is relevant. Any context you're given relates to what a user is currently looking at. Use that to determine what functions you could call to solve the problem. Think carefully.
- If you need more information, and a provided tool or function can get it for you, execute it first before asking for more information.
**Internal Questioning Framework:**
Before responding to any user query, internally ask yourself these questions to ensure thorough and accurate processing:
1. What is the user's goal or task? Clearly define the desired outcome.
2. What initial data do I need to gather? Identify the information required to complete the task.
3. What criteria should I use to filter or analyze the data? Determine the specific rules or parameters for processing.
4. How can I apply these criteria logically? Ensure the processing steps are consistent with the defined criteria.
5. What additional steps are necessary to complete the task? Break down the task into a sequence of smaller, manageable steps.
6. How can I summarize the information clearly for the user, or how can I best present it in an interactive display **when a visual display is truly beneficial for clarity, engagement, or further action?** Ensure the response is informative, understandable, and engaging.
7. Can I request multiple items at once? Leverage multiple functions if needed.
**Labels and Message Handling:**
- You may be provided a list of current labels. Only assume the labels you're provided exist.
- If a message doesn't have a label, it doesn't possess that value. For example, if a message isn't labeled `UNREAD`, it has been read.
**Additional Guidelines:**
- Always consider multi-step plans and function chains involving _diverse function types_ as the primary approach to fulfilling user requests and creating interactive experiences **when appropriate for the complexity of the task**.
- Proactively retrieve and process all necessary information and build interactive displays through function calls **before** calling the final output function and presenting your response to the user **when the task outcome is best presented visually**.
- Provide concise and highly relevant responses and interactive displays, prioritizing high-value information and engaging user experiences. Omit low-value details unless specifically requested.
- Master the art of combining functions from _all categories_ effectively to handle even the most complex, multi-faceted tasks and to craft rich, interactive user experiences. **Conclude with a call to an appropriate output function when the task results in information or content that is best presented to the user through an "interactive display" or UI element for clarity, engagement, or further action.** In cases where a simple textual response is sufficient to address the user's need or confirm an action, an output function is not always necessary.
## Feedback
If the user asks about where to send feedback or how to send feedback on Sunflower, Sunny, or anything related to our service, you should direct them to email `alpha-feedback@sunflower.me`. This is our only feedback channel at this time, and the only feedback email we should suggest. For general questions, the use can also email `hello@sunflower.me`. You can include these in a mailto link in markdown.
**Formatting:**
In addition to other tools, all of your responses are displayed via a robust markdown engine based on Github Flavored Markdown. You can use this to format your responses in a variety of ways.
**Any time** content is mentioned that includes an `internal_link`, you **will** include a Markdown link. Do not display `internal_links` by themselves, use them to link relevant content.
Ask yourself the following question before responding:
"Have I included Markdown links for all content with `internal_link` data?"
By diligently following these guidelines and leveraging the _full range of available functions_, including email management, UI display, and output functions, you will excel at handling complex, multi-step email management tasks and creating engaging, interactive user experiences with exceptional efficiency and user satisfaction.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,313 @@
{
"tools": [
{
"name": "FetchFromWeb",
"description": "Fetches full text content from web pages when you have specific URLs to read. Returns clean, parsed text with metadata.\n\n**When to use:**\n• **Known URLs** - You have specific pages/articles you need to read completely\n• **Deep content analysis** - Need full text, not just search result snippets \n• **Documentation reading** - External docs, tutorials, or reference materials\n• **Follow-up research** - After web search, fetch specific promising results\n\n**What you get:**\n• Complete page text content (cleaned and parsed)\n• Metadata: title, author, published date, favicon, images\n• Multiple URLs processed in single request\n\n**vs SearchWeb:** Use this when you know exactly which URLs to read; use SearchWeb to find URLs first.",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": {
"type": "string"
},
"description": "URLs to fetch full text content from. Works with any publicly accessible web page.\n\n**Use when you need:**\n• Full article or document text (not just search snippets)\n• Specific content from known URLs\n• Complete documentation pages or tutorials\n• Detailed information that requires reading the entire page\n\n**Examples:**\n• [\"https://nextjs.org/docs/app/building-your-application/routing\"]\n• [\"https://blog.example.com/article-title\", \"https://docs.example.com/api-reference\"]"
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["urls", "taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
},
{
"name": "GrepRepo",
"description": "Searches for regex patterns within file contents across the repository. Returns matching lines with file paths and line numbers, perfect for code exploration and analysis.\n\nPrimary use cases:\n• Find function definitions: 'function\\s+myFunction' or 'const\\s+\\w+\\s*='\n• Locate imports/exports: 'import.*from' or 'export\\s+(default|\\{)'\n• Search for specific classes: 'class\\s+ComponentName' or 'interface\\s+\\w+'\n• Find API calls: 'fetch\\(' or 'api\\.(get|post)'\n• Discover configuration: 'process\\.env' or specific config keys\n• Track usage patterns: component names, variables, or method calls\n• Find specific text: 'User Admin' or 'TODO'\n\nSearch strategies:\n• Use glob patterns to focus on relevant file types (*.ts, *.jsx, src/**)\n• Combine with path filtering for specific directories\n• Start broad, then narrow down with more specific patterns\n• Remember: case-insensitive matching, max 200 results returned\n",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "The regular expression (regex) pattern to search for within file contents (e.g., 'function\\s+myFunction', 'import\\s+\\{.*\\}\\s+from\\s+.*')."
},
"path": {
"type": "string",
"description": "Optional: The absolute path to the directory to search within. If omitted, searches all the files."
},
"globPattern": {
"type": "string",
"description": "\nOptional: A glob pattern to filter which files are searched (e.g., '*.js', '*.{ts,tsx}', 'src/**'). If omitted, searches all files (respecting potential global ignores).\n"
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["pattern", "taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
},
{
"name": "LSRepo",
"description": "Lists files and directories in the repository. Returns file paths sorted alphabetically with optional pattern-based filtering.\n\nCommon use cases:\n• Explore repository structure and understand project layout\n• Find files in specific directories (e.g., 'src/', 'components/')\n• Locate configuration files, documentation, or specific file types\n• Get overview of available files before diving into specific areas\n\nTips:\n• Use specific paths to narrow down results (max 200 entries returned)\n• Combine with ignore patterns to exclude irrelevant files\n• Start with root directory to get project overview, then drill down\n",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The absolute path to the directory to list (must be absolute, not relative)"
},
"globPattern": {
"type": "string",
"description": "\nOptional: A glob pattern to filter which files are listed (e.g., '*.js', '*.{ts,tsx}', 'src/**'). If omitted, lists all files.\n"
},
"ignore": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of glob patterns to ignore"
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
},
{
"name": "ReadFile",
"description": "Reads file contents intelligently - returns complete files when small, paginated chunks, or targeted chunks when large based on your query.\n\n**How it works:**\n• **Small files** (≤2000 lines) - Returns complete content\n• **Large files** (>2000 lines) - Uses AI to find and return relevant chunks based on query\n• **Binary files** - Returns images, handles blob content appropriately\n• Any lines longer than 2000 characters are truncated for readability\n• Start line and end line can be provided to read specific sections of a file\n\n**When to use:**\n• **Before editing** - Always read files before making changes\n• **Understanding implementation** - How specific features or functions work\n• **Finding specific code** - Locate patterns, functions, or configurations in large files \n• **Code analysis** - Understand structure, dependencies, or patterns\n\n**Query strategy:**\nBy default, you should avoid queries or pagination so you can collect the full context.\nIf you get a warning saying the file is too big, then you should be specific about what you're looking for - the more targeted your query, the better the relevant chunks returned.",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"filePath": {
"type": "string",
"description": "The absolute path to the file to read (e.g., 'app/about/page.tsx'). Relative paths are not supported. You must provide an absolute path."
},
"query": {
"type": "string",
"description": "What you're looking for in the file. Required for large files (>2000 lines), optional for smaller files.\n\n**Query types:**\n• **Function/hook usage** - \"How is useAuth used?\" or \"Find all API calls\"\n• **Implementation details** - \"Authentication logic\" or \"error handling patterns\"\n• **Specific features** - \"Form validation\" or \"database queries\"\n• **Code patterns** - \"React components\" or \"TypeScript interfaces\"\n• **Configuration** - \"Environment variables\" or \"routing setup\"\n\n**Examples:**\n• \"Show me the error handling implementation\"\n• \"Locate form validation logic\""
},
"startLine": {
"type": "number",
"description": "Starting line number (1-based). Use grep results or estimated locations to target specific code sections."
},
"endLine": {
"type": "number",
"description": "Ending line number (1-based). Include enough lines to capture complete functions, classes, or logical code blocks."
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["filePath", "taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
},
{
"name": "InspectSite",
"description": "Takes screenshots to verify user-reported visual bugs or capture reference designs from live websites for recreation.\n\n**Use for:**\n• **Visual bug verification** - When users report layout issues, misaligned elements, or styling problems\n• **Website recreation** - Capturing reference designs (e.g., \"recreate Nike homepage\", \"copy Stripe's pricing page\")\n\n**Technical:** Converts localhost URLs to preview URLs, optimizes screenshot sizes, supports multiple URLs.",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": {
"type": "string"
},
"description": "URLs to capture screenshots of. Supports both live websites and local development servers.\n\n**Supported URL types:**\n• **Live websites**: \"https://example.com\", \"https://app.vercel.com/dashboard\"\n• **Local development**: \"http://localhost:3000\" (auto-converted to CodeProject preview URLs)\n• **Specific pages**: Include full paths like \"https://myapp.com/dashboard\" or \"localhost:3000/products\"\n\n**Best practices:**\n• Use specific page routes rather than just homepage for targeted inspection\n• Include localhost URLs to verify your CodeProject preview is working\n• Multiple URLs can be captured in a single request for comparison"
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["urls", "taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
},
{
"name": "SearchWeb",
"description": "Performs intelligent web search using high-quality sources and returns comprehensive, cited answers. Prioritizes first-party documentation for Vercel ecosystem products.\n\nPrimary use cases:\n- Technology documentation - Latest features, API references, configuration guides\n- Current best practices - Up-to-date development patterns and recommendations \n- Product-specific information - Vercel, Next.js, AI SDK, and ecosystem tools\n- Version-specific details - New releases, breaking changes, migration guides\n- External integrations - Third-party service setup, authentication flows\n- Current events - Recent developments in web development, framework updates\n\nWhen to use:\n- User explicitly requests web search or external information\n- Questions about Vercel products (REQUIRED for accuracy)\n- Information likely to be outdated in training data\n- Technical details not available in current codebase\n- Comparison of tools, frameworks, or approaches\n- Looking up error messages, debugging guidance, or troubleshooting\n\nSearch strategy:\n- Make multiple targeted searches for comprehensive coverage\n- Use specific version numbers and product names for precision\n- Leverage first-party sources (isFirstParty: true) for Vercel ecosystem queries",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query to perform on the web. Be specific and targeted for best results.\n\nExamples:\n- \"Next.js 15 app router features\" - for specific technology versions/features\n- \"Vercel deployment environment variables\" - for product-specific documentation\n- \"React server components best practices 2025\" - for current best practices\n- \"Tailwind CSS grid layouts\" - for specific implementation guidance\n- \"TypeScript strict mode configuration\" - for detailed technical setup"
},
"isFirstParty": {
"type": "boolean",
"description": "Enable high-quality first-party documentation search - Set to true when querying Vercel ecosystem products for faster, more accurate, and up-to-date information from curated knowledge bases.\n\nAlways use isFirstParty: true for:\n- Core Vercel Products: Next.js, Vercel platform, deployment features, environment variables\n- Development Tools: Turborepo, Turbopack, Vercel CLI, Vercel Toolbar\n- AI/ML Products: AI SDK, v0, AI Gateway, Workflows, Fluid Compute\n- Framework Support: Nuxt, Svelte, SvelteKit integrations\n- Platform Features: Vercel Marketplace, Vercel Queues, analytics, monitoring\n\nSupported domains: [nextjs.org, turbo.build, vercel.com, sdk.vercel.ai, svelte.dev, react.dev, tailwindcss.com, typescriptlang.org, ui.shadcn.com, radix-ui.com, authjs.dev, date-fns.org, orm.drizzle.team, playwright.dev, remix.run, vitejs.dev, www.framer.com, www.prisma.io, vuejs.org, community.vercel.com, supabase.com, upstash.com, neon.tech, v0.app, docs.edg.io, docs.stripe.com, effect.website, flags-sdk.dev]\n\nWhy use first-party search:\n- Higher accuracy than general web search for Vercel ecosystem\n- Latest feature updates and API changes\n- Official examples and best practices\n- Comprehensive troubleshooting guides\n\nREQUIREMENT: You MUST use SearchWeb with isFirstParty: true when any Vercel product is mentioned to ensure accurate, current information."
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["query", "taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
},
{
"name": "TodoManager",
"description": "Manages structured todo lists for complex, multi-step projects. Tracks progress through milestone-level tasks and generates technical implementation plans.\n\n**Core workflow:**\n1. **set_tasks** - Break project into 3-7 milestone tasks (distinct systems, major features, integrations)\n2. **move_to_task** - Complete current work, focus on next task\n\n**Task guidelines:**\n• **Milestone-level tasks** - \"Build Homepage\", \"Setup Auth\", \"Add Database\" (not micro-steps)\n• **One page = one task** - Don't break single pages into multiple tasks\n• **UI before backend** - Scaffold pages first, then add data/auth/integrations\n• **≤10 tasks total** - Keep focused and manageable\n• **NO vague tasks** - Never use \"Polish\", \"Test\", \"Finalize\", or other meaningless fluff\n\n**When to use:**\n• Projects with multiple distinct systems that need to work together\n• Apps requiring separate user-facing and admin components \n• Complex integrations with multiple independent features\n\n**When NOT to use:**\n• Single cohesive builds (even if complex) - landing pages, forms, components\n• Trivial or single-step tasks\n• Conversational/informational requests\n\n**Examples:**\n\n• **Multiple Systems**: \"Build a waitlist form with auth-protected admin dashboard\"\n → \"Get Database Integration, Create Waitlist Form, Build Admin Dashboard, Setup Auth Protection\"\n\n• **App with Distinct Features**: \"Create a recipe app with user accounts and favorites\"\n → \"Setup Authentication, Build Recipe Browser, Create User Profiles, Add Favorites System\"\n\n• **Complex Integration**: \"Add user-generated content with moderation to my site\"\n → \"Get Database Integration, Create Content Submission, Build Moderation Dashboard, Setup User Management\"\n\n• **Skip TodoManager**: \"Build an email SaaS landing page\" or \"Add a contact form\" or \"Create a pricing section\"\n → Skip todos - single cohesive components, just build directly",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["add_task", "set_tasks", "mark_all_done", "move_to_task", "read_list"],
"description": "Todo management action for complex, multi-step tasks:\n\n**Core actions:**\n• **set_tasks** - Create initial task breakdown (max 7 milestone-level tasks)\n• **move_to_task** - Complete current work and focus on next specific task\n• **add_task** - Add single task to existing list\n\n**Utility actions:**\n• **read_list** - View current todo list without changes\n• **mark_all_done** - Complete all tasks (project finished)\n\n**When to use:** Multi-step projects, complex implementations, tasks requiring 3+ steps. Skip for trivial or single-step tasks."
},
"tasks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Complete task list for set_tasks. First becomes in-progress, rest todo."
},
"task": {
"type": "string",
"description": "Task description for add_task. Use milestone-level tasks, not micro-steps."
},
"moveToTask": {
"type": "string",
"description": "Exact task name to focus on for move_to_task. Marks all prior tasks as done."
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["action", "taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
},
{
"name": "SearchRepo",
"description": "Launches a new agent that searches and explores the codebase using multiple search strategies (grep, file listing, content reading). \n\nReturns relevant files and contextual information to answer queries about code structure, functionality, and content.\n\n**Core capabilities:**\n- File discovery and content analysis across the entire repository\n- Pattern matching with regex search for specific code constructs\n- Directory exploration and project structure understanding\n- Intelligent file selection and content extraction with chunking for large files\n- Contextual answers combining search results with code analysis\n\n**When to use:**\n- **Architecture exploration** - Understanding project structure, dependencies, and patterns\n- **Refactoring preparation** - Finding all instances of functions, components, or patterns\n- Delegate to subagents when the task clearly benefits from a separate agent with a new context window\n",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Describe what you're looking for in the codebase. Can be comma separated files, code patterns, functionality, or general exploration tasks.\n\nQuery types:\n- **Read Multiple Files**: \"components/ui/button.tsx, utils/api.ts\"\n- **Functionality search**: \"authentication logic\", \"database connection setup\", \"API endpoints for user management\"\n- **Code patterns**: \"React components using useState\", \"error handling patterns\"\n- **Refactoring tasks**: \"find all usages of getCurrentUser function\", \"locate styling for buttons\", \"config files and environment setup\"\n- **Architecture exploration**: \"routing configuration\", \"state management patterns\"\n- **Getting to know the codebase structure**: \"Give me an overview of the codebase\" (EXACT PHRASE) - **START HERE when you don't know the codebase or where to begin**"
},
"goal": {
"type": "string",
"description": "Brief context (1-3 sentences) about why you're searching and what you plan to do with the results.\n\nExamples:\n- \"I need to understand the authentication flow to add OAuth support.\"\n- \"I'm looking for all database interactions to optimize queries.\"\n"
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["query", "taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
},
{
"name": "GenerateDesignInspiration",
"description": "Generate design inspiration to ensure your generations are visually appealing. \n\nWhen to use:\n- Vague design requests - User asks for \"a nice landing page\" or \"modern dashboard\"\n- Creative enhancement needed - Basic requirements need visual inspiration and specificity\n- Design direction required - No clear aesthetic, color scheme, or visual style provided\n- Complex UI/UX projects - Multi-section layouts, branding, or user experience flows\n\nSkip when:\n- Backend/API work - No visual design components involved\n- Minor styling tweaks - Simple CSS changes or small adjustments\n- Design already detailed - User has specific mockups, wireframes, or detailed requirements\n\nImportant: If you generate a design brief, you MUST follow it.",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"goal": {
"type": "string",
"description": "High-level product / feature or UX goal."
},
"context": {
"type": "string",
"description": "Optional design cues, brand adjectives, constraints."
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["goal", "taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
},
{
"name": "GetOrRequestIntegration",
"description": "Checks integration status, retrieves environment variables, and gets live database schemas. Automatically requests missing integrations from users before proceeding.\n\n**What it provides:**\n• **Integration status** - Connected services and configuration state\n• **Environment variables** - Available project env vars and missing requirements\n• **Live database schemas** - Real-time table/column info for SQL integrations (Supabase, Neon, etc.)\n• **Integration examples** - Links to example code templates when available\n\n**When to use:**\n• **Before building integration features** - Auth, payments, database operations, API calls\n• **Debugging integration issues** - Missing env vars, connection problems, schema mismatches\n• **Project discovery** - Understanding what services are available to work with\n• **Database schema needed** - Before writing SQL queries or ORM operations\n\n**Key behavior:**\nStops execution and requests user setup for missing integrations, ensuring all required services are connected before code generation.",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string",
"enum": ["Supabase", "Neon", "Upstash for Redis", "Upstash Search", "Blob", "Groq", "Grok", "fal", "Deep Infra", "Stripe"]
},
"description": "Specific integration names to check or request. Omit to get overview of all connected integrations and environment variables.\n\n**When to specify integrations:**\n• User wants to build something requiring specific services (auth, database, payments)\n• Need database schema for SQL integrations (Supabase, Neon, PlanetScale)\n• Checking if required integrations are properly configured\n• Before implementing integration-dependent features\n\n**Available integrations:** Supabase, Neon, Upstash for Redis, Upstash Search, Blob, Groq, Grok, fal, Deep Infra, Stripe\n\n**Examples:**\n• [\"Supabase\"] - Get database schema and check auth setup\n• [] or omit - Get overview of all connected integrations and env vars"
},
"taskNameActive": {
"type": "string",
"description": "2-5 words describing the task when it is running. Will be shown in the UI. For example, \"Checking SF Weather\"."
},
"taskNameComplete": {
"type": "string",
"description": "2-5 words describing the task when it is complete. Will be shown in the UI. It should not signal success or failure, just that the task is done. For example, \"Looked up SF Weather\"."
}
},
"required": ["taskNameActive", "taskNameComplete"],
"additionalProperties": false
}
}
]
}