{"protocol_version":"2.0","capabilities":{"tools":true,"streaming":{"sse":true,"jobs":true}},"server_info":{"name":"agentstack-mcp","version":"2.0"},"api_key_context":{"service_caps":null,"note":"null = no restriction (full access). List = only those services are callable. Cap-gated actions: payments.* and wallets.* require 'payments'; scheduler.* requires 'scheduler'; key management requires 'api_keys'; project membership/admin writes require 'project_admin'; asset writes require 'assets_write'; data_access policy writes require 'data_access_admin'; logic/proc mutating execution requires 'logic_write'. Use apikeys.create with service_caps to provision restricted keys."},"tools":[{"name":"agentstack.execute","description":"Execute one or more AgentStack operations in a single call. Use when the provider limits tool count. Send steps: each step has id, action (e.g. projects.create_project_anonymous, buffs.apply_temporary_effect), params. Reference previous step results with {\"from\": \"stepId.result.field\"}; use \"if\" for conditional steps. Full list of actions: GET /mcp/actions. Domains: projects, buffs, auth, payments, logic, assets, scheduler, analytics, api_keys, rules, webhooks, notifications, wallets, commerce_rest (REST-only hints).","inputSchema":{"type":"object","properties":{"steps":{"type":"array","description":"List of steps to run in order. Each: id (string), action (string), params (object), optional if (condition).","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"params":{"type":"object"},"if":{"type":"object"}},"required":["id","action"]}},"options":{"type":"object","properties":{"stopOnError":{"type":"boolean"},"continueOnError":{"type":"boolean"},"async":{"type":"boolean"},"idempotency_key":{"type":"string"}}}},"required":["steps"]}}],"ai_instructions":{"summary":"Use agentstack.execute for all operations; fetch full guidance from /mcp/ai_prompt","full_prompt_url":"/mcp/ai_prompt"},"common_workflows":[{"name":"Find user and update role","description":"Find a user by email and update their role","steps":["Use commands.execute with dna_crud/get to find user","Extract user_id from result","Use commands.execute with dna_crud/update to change role"],"tools":["commands.execute"],"example":{"step1":{"tool":"commands.execute","params":{"command_type":"dna_crud","command_name":"get_user","payload":{"target_entity":"data_users_user","operation_type":"get","filters":{"email":"user@example.com"}}}},"step2":{"tool":"commands.execute","params":{"command_type":"dna_crud","command_name":"update_user_role","payload":{"target_entity":"data_users_user","operation_type":"update","filters":{"user_id":123},"updates":{"role":"admin"}}}}}},{"name":"Create logic rule from description","description":"Create a backend logic rule from natural language description","steps":["Use logic.get_processors to see available processors","Use logic.get_commands to see available commands","Use logic.create to create rule with processors and triggers"],"tools":["logic.get_processors","logic.get_commands","logic.create"],"example":{"step1":{"tool":"logic.get_processors","params":{}},"step2":{"tool":"logic.get_commands","params":{}},"step3":{"tool":"logic.create","params":{"name":"Daily Reward","description":"Grant daily reward to user","triggers":[{"type":"command","command":"check.daily_reward","when":{}}],"space":[{"processor":"field_operations_processor","action":"add","parameters":{"field1":"user.daily_streak","field2":1,"result_field":"user.daily_streak"}}],"enabled":true}}}},{"name":"Update user data","description":"Find and update user information","steps":["Use commands.execute with filters to find user","Use commands.execute with updates to modify data"],"tools":["commands.execute"],"example":{"step1":{"tool":"commands.execute","params":{"command_type":"dna_crud","command_name":"get_user","payload":{"target_entity":"data_users_user","operation_type":"get","filters":{"user_id":123}}}},"step2":{"tool":"commands.execute","params":{"command_type":"dna_crud","command_name":"update_user","payload":{"target_entity":"data_users_user","operation_type":"update","filters":{"user_id":123},"updates":{"name":"New Name","email":"new@example.com"}}}}}},{"name":"Process payment and activate subscription","description":"Charge user, then apply subscription buff — use if condition so buff only activates on success","steps":["1. payments.create — charge user","2. buffs.apply_buff with 'if' condition on payment status — apply only if completed","3. scheduler.create_task — schedule renewal"],"tools":["payments.create","buffs.apply_buff","scheduler.create_task"],"example":{"step1":{"tool":"payments.create","params":{"amount":29.0,"currency":"USD","description":"Pro Plan Monthly"}},"step2":{"tool":"buffs.apply_buff","params":{"buff_id":"$pro_buff_id","entity_id":"$user_id","entity_kind":"user"},"if":{"from":"step1.result.status","op":"equals","value":"completed"}}}},{"name":"Create project and provision economy","description":"Bootstrap a project with a currency, wallet, and initial balance in one batch","steps":["1. projects.create_project_anonymous — create project","2. assets.create — define currency (type=currency)","3. wallets.create — create wallet for the project","4. wallets.deposit — seed initial balance","5. payments.get_balance — verify"],"tools":["projects.create_project_anonymous","assets.create","wallets.create","wallets.deposit","payments.get_balance"],"example":{"step1":{"tool":"projects.create_project_anonymous","params":{"name":"My App"}},"step2":{"tool":"assets.create","params":{"name":"Credits","type":"currency","data":{"symbol":"CR"}}},"step3":{"tool":"wallets.create","params":{"name":"Main Wallet","currency":"credits"}},"step4":{"tool":"wallets.deposit","params":{"wallet_id":{"from":"step3.result.wallet_id"},"amount":500}}}},{"name":"Provision restricted API keys for AI agents","description":"Create API keys with service_caps to limit which services each agent can access","steps":["1. apikeys.create (service_caps: ['payments']) — payment agent only","2. apikeys.create (service_caps: ['scheduler']) — cron agent only","3. apikeys.create (service_caps: ['analytics']) — analytics dashboard","4. apikeys.list — verify"],"tools":["apikeys.create","apikeys.list"],"example":{"step1":{"tool":"apikeys.create","params":{"name":"Payment Agent","service_caps":["payments"]}},"step2":{"tool":"apikeys.create","params":{"name":"Scheduler Bot","service_caps":["scheduler"]}},"step3":{"tool":"apikeys.create","params":{"name":"Analytics Key","service_caps":["analytics"]}},"step4":{"tool":"apikeys.list","params":{}}}}],"tool_combinations":[{"task":"Finding and updating entities","tools":["commands.execute","commands.execute"],"description":"Use commands.execute with get operation, then update operation"},{"task":"Creating logic rules","tools":["logic.get_processors","logic.get_commands","logic.create"],"description":"First discover available processors and commands, then create rule"},{"task":"Project management","tools":["projects.get_projects","projects.get_project","projects.update_project"],"description":"List projects, get details, then update settings"},{"task":"User management","tools":["projects.get_users","projects.add_user","projects.update_user_role"],"description":"List users, add new user, update user role"},{"task":"Payment processing","tools":["payments.create","payments.get","payments.list_transactions"],"description":"Create payment, check status, list transaction history"},{"task":"Auto-trial on user signup","tools":["logic.create","buffs.apply_temporary_effect"],"description":"Create logic rule with trigger 'user.created' that applies temporary trial buff. Perfect for SaaS platforms.","synergy":"Logic Engine (automation) + Buffs (temporary effects)"},{"task":"Subscription with auto-renewal","tools":["buffs.create_buff","payments.create","buffs.apply_buff","scheduler.create_task"],"description":"Create subscription buff, process payment, apply buff, then schedule auto-renewal. Complete subscription workflow.","synergy":"Buffs (subscriptions) + Payments (monetization) + Scheduler (auto-renewal)"},{"task":"Promo campaign for all users","tools":["buffs.create_buff","buffs.apply_buff"],"description":"Create promo buff for project (affects all users), apply it. Use logic.create for notification side-effects if needed.","synergy":"Buffs (promo effects) on project = global event for everyone"},{"task":"Setup project economy (currencies and wallets)","tools":["projects.create_project_anonymous","assets.create","wallets.create","wallets.deposit"],"description":"Create project, add currencies as assets (type=currency), create wallet, deposit. Full economy setup.","synergy":"Projects + Assets (currencies) + Wallets (list/create/deposit/transfer)"},{"task":"Monitor and auto-scale limits","tools":["logic.create","analytics.get_usage","buffs.apply_temporary_effect"],"description":"Create logic rule that monitors usage, automatically increases limits via buffs when threshold reached. PARADIGM: Buffs as auto-scaler!","synergy":"Logic Engine (monitoring) + Analytics (usage) + Buffs (auto-scaling)","paradigm_note":"Buffs = temporary limit increase that auto-reverts"},{"task":"In-app purchase workflow","tools":["payments.create","buffs.apply_persistent_effect"],"description":"Process payment for in-app purchase, then apply persistent effect (currency, items, upgrades). Perfect for games. PARADIGM: Buffs as permanent reward system!","synergy":"Payments (monetization) + Buffs (permanent effects)","paradigm_note":"Buffs with persistent=True = permanent item grants"},{"task":"Global event for all players","tools":["buffs.apply_temporary_effect"],"description":"Apply buff to PROJECT (entity_kind='project') to affect ALL users instantly. PARADIGM: Project buffs = global events!","synergy":"Buffs on project = instant global effects for everyone","paradigm_note":"entity_kind='project' → affects all users, auto-expires"},{"task":"NPC system with AI behavior","tools":["commands.execute","buffs.apply_temporary_effect","logic.create"],"description":"Store NPCs as user entities (email: 'npc@game', data: {ai, inventory}). PARADIGM: Users = universal containers!","synergy":"Users as NPCs + Buffs for status effects + Logic for AI","paradigm_note":"Users can be NPCs, bots, sessions - anything with data!"}],"actions_url":"/mcp/actions"}