Shared Tools
6 tools for coordinating work across different AI systems and getting user input.
What are Shared Tools?
Shared tools enable coordination between different parts of the AppsAI system. They're primarily used internally when one AI system needs to request work from another, or when user input is required to proceed.
shared_DECLARE_BACKEND_NEEDSignal that backend changes are needed (code or infrastructure). Used to coordinate frontend and backend work.
Parameters
projectId | string | Required | The project ID |
description | string | Required | What backend changes are needed |
context | object | Optional | Additional context for the backend AI |
Example
{
"projectId": "abc123",
"description": "Need a cloud function to handle user registration with email verification",
"context": {
"relatedFrontendFile": "app/signup/page.tsx",
"requiredFields": ["email", "password", "name"]
}
}shared_DECLARE_MONGODB_NEEDSignal that database changes are needed.
Parameters
projectId | string | Required | The project ID |
description | string | Required | What database changes are needed |
context | object | Optional | Additional context |
Example
{
"projectId": "abc123",
"description": "Need a new collection 'orders' with indexes on userId and createdAt"
}shared_DECLARE_CANVAS_NEEDSignal that frontend changes are needed. Used when backend changes require UI updates.
Parameters
projectId | string | Required | The project ID |
description | string | Required | What frontend changes are needed |
context | object | Optional | Additional context |
Example
{
"projectId": "abc123",
"description": "Need a form component to collect order details",
"context": {
"targetFile": "app/checkout/page.tsx",
"cloudFunction": "createOrder"
}
}shared_DECLARE_AGENT_NEEDSignal that AI prompt changes are needed.
Parameters
projectId | string | Required | The project ID |
description | string | Required | What prompt changes are needed |
context | object | Optional | Additional context |
Example
{
"projectId": "abc123",
"description": "Need a prompt for summarizing customer support tickets"
}shared_ASK_USERRequest input or clarification from the user when a decision cannot be made automatically.
Parameters
projectId | string | Required | The project ID |
question | string | Required | The question to ask the user |
options | string[] | Optional | Optional list of choices |
context | string | Optional | Context to help the user understand |
Example
{
"projectId": "abc123",
"question": "Which authentication method would you like to use?",
"options": ["Email/Password", "OAuth (Google)", "Magic Link"],
"context": "This will determine how users sign up and log in to your app"
}When to Use These Tools
Cross-system dependencies
When working on the frontend and you discover that backend changes are needed, use DECLARE_BACKEND_NEED to communicate this.
User decisions
When there are multiple valid approaches and the choice should be made by the user, use ASK_USER.
Complex workflows
When a feature requires changes across multiple systems (frontend, backend, database), use DECLARE_* tools to coordinate.
Note for MCP users
When using the MCP server directly, you typically won't need the DECLARE_* tools since you're orchestrating the work yourself. These are mainly used by the AppsAI web interface to coordinate between specialized AI agents. However, ASK_USER can be useful when you want to pause and get user input during a complex operation.