Backend Tools
Tools for backend development — manage server code, cloud functions, and infrastructure.
Template-Driven Architecture
AppsAI supports multiple backend types (Parse Server, Express, Serverless, etc.). The tools below work with any backend template — the AI adapts to your project's configuration.
Code Management
backend_LIST_BACKEND_FILESList all files in the backend directory.
Parameters
projectId | string | Required | The project ID |
path | string | Optional | Subdirectory path to list (default: root) |
Example
{
"projectId": "abc123"
}
// Returns
{
"files": [
"src/cloud/main.ts",
"src/cloud/triggers.ts",
"src/cloud/functions/auth.ts",
"package.json"
]
}backend_READ_BACKEND_FILERead the contents of a backend file.
Parameters
projectId | string | Required | The project ID |
filePath | string | Required | Path to the file |
Example
{
"projectId": "abc123",
"filePath": "src/cloud/main.ts"
}
// Returns
{
"content": "import Parse from 'parse/node';\n\nParse.Cloud.define('hello', () => {\n return 'Hello World!';\n});",
"filePath": "src/cloud/main.ts"
}backend_SET_BACKEND_FILECreate or update a backend file.
Parameters
projectId | string | Required | The project ID |
filePath | string | Required | Path to the file |
content | string | Required | New file contents |
Example
{
"projectId": "abc123",
"filePath": "src/cloud/functions/users.ts",
"content": "import Parse from 'parse/node';\n\nParse.Cloud.define('getUser', async (req) => {\n const user = await new Parse.Query('User').get(req.params.userId);\n return user.toJSON();\n});"
}backend_GREP_BACKEND_FILESSearch for text patterns across backend files.
Parameters
projectId | string | Required | The project ID |
pattern | string | Required | Search pattern (regex supported) |
path | string | Optional | Subdirectory to search in |
Example
{
"projectId": "abc123",
"pattern": "Parse.Cloud.define"
}
// Returns
{
"matches": [
{ "file": "src/cloud/main.ts", "line": 3, "content": "Parse.Cloud.define('hello', () => {" },
{ "file": "src/cloud/functions/users.ts", "line": 5, "content": "Parse.Cloud.define('getUser', async (req) => {" }
]
}backend_RUN_BUILDRun the build process for the backend. This compiles TypeScript and validates the code.
Parameters
projectId | string | Required | The project ID |
Example
{
"projectId": "abc123"
}
// Returns
{
"success": true,
"output": "Build completed successfully",
"errors": []
}backend_SET_BACKEND_ENV_VARIABLESet an environment variable for the backend.
Parameters
projectId | string | Required | The project ID |
key | string | Required | Environment variable name |
value | string | Required | Environment variable value |
Example
{
"projectId": "abc123",
"key": "STRIPE_SECRET_KEY",
"value": "sk_live_xxxxx"
}Infrastructure
Backend AI also manages cloud infrastructure. See the AWS Tools page for CloudFormation, S3, SES, and other infrastructure tools.
Best Practices
Always run build after changes
After modifying backend files, run backend_RUN_BUILD to compile TypeScript and catch errors before deploying.
Use environment variables for secrets
Never hardcode API keys or secrets in your code. Use backend_SET_BACKEND_ENV_VARIABLE instead.
Organize code by domain
Keep related functions together in files like auth.ts, users.ts, orders.ts for maintainability.