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_NEED

Signal that backend changes are needed (code or infrastructure). Used to coordinate frontend and backend work.

Parameters

projectIdstringRequiredThe project ID
descriptionstringRequiredWhat backend changes are needed
contextobjectOptionalAdditional 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_NEED

Signal that database changes are needed.

Parameters

projectIdstringRequiredThe project ID
descriptionstringRequiredWhat database changes are needed
contextobjectOptionalAdditional context

Example

{
  "projectId": "abc123",
  "description": "Need a new collection 'orders' with indexes on userId and createdAt"
}
shared_DECLARE_CANVAS_NEED

Signal that frontend changes are needed. Used when backend changes require UI updates.

Parameters

projectIdstringRequiredThe project ID
descriptionstringRequiredWhat frontend changes are needed
contextobjectOptionalAdditional context

Example

{
  "projectId": "abc123",
  "description": "Need a form component to collect order details",
  "context": {
    "targetFile": "app/checkout/page.tsx",
    "cloudFunction": "createOrder"
  }
}
shared_DECLARE_AGENT_NEED

Signal that AI prompt changes are needed.

Parameters

projectIdstringRequiredThe project ID
descriptionstringRequiredWhat prompt changes are needed
contextobjectOptionalAdditional context

Example

{
  "projectId": "abc123",
  "description": "Need a prompt for summarizing customer support tickets"
}
shared_ASK_USER

Request input or clarification from the user when a decision cannot be made automatically.

Parameters

projectIdstringRequiredThe project ID
questionstringRequiredThe question to ask the user
optionsstring[]OptionalOptional list of choices
contextstringOptionalContext 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.