submit_app_requirements
Submit app requirements to start planning and generate initial MVP tasks for a new application in Databutton.
Instructions
Submit app requirements
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the app | |
| pitch | Yes | The pitch for the app | |
| spec | Yes |
Implementation Reference
- The main handler function implementing the 'submit_app_requirements' tool logic. Parses input using Zod schema, encodes requirements to base64 and URL, generates a submission link to databutton.com, and returns a success response or error.export const submitAppRequirementsImpl = async ( args: RawArgs, ): Promise<Result> => { const parsed = parseToolInput<Input>({ input: args, schema }); if (parsed.success) { const base64Encoded = btoa(JSON.stringify(parsed.data)); const urlEncoded = encodeURIComponent(base64Encoded); return buildSimpleResponse( `App requirements submitted. Click the following link to get started: https://databutton.com/submit?requirements=${urlEncoded}`, ); } return buildSimpleResponse(parsed.message); };
- The tool definition object containing the name, description, and input JSON schema derived from Zod for validation.export const submitAppRequirementsDef = { name: ToolName.SUBMIT_APP_REQUIREMENTS, description: "Submit app requirements", inputSchema: zodToJsonSchema(schema), };
- src/index.ts:73-77 (registration)Registers the tool by including it in the list of available tools returned by the ListTools handler.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [submitAppRequirementsDef], }; });
- src/index.ts:82-91 (registration)Registers the tool dispatch by handling CallTool requests and invoking the implementation when the tool name matches.server.setRequestHandler(CallToolRequestSchema, async (request) => { switch (request.params.name) { case submitAppRequirementsDef.name: { return await submitAppRequirementsImpl(request.params.arguments); } default: throw new Error("Unknown tool"); } });
- src/enums.ts:1-3 (helper)Enum defining the tool name constant used in the tool definition and matching.export enum ToolName { SUBMIT_APP_REQUIREMENTS = "submit_app_requirements", }