cast_prediction
Predict whether an idea will happen by choosing support or pass, setting your confidence level, and optionally adding reasoning.
Instructions
Cast your call on an idea. choice = "support" if you think it happens, "pass" if not. Confidence is your conviction. Optional why is your reasoning (logged with the prediction; useful when the result comes in to see what you were thinking).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ideaId | Yes | ||
| choice | Yes | ||
| confidence | Yes | ||
| why | No | Optional reasoning, max 280 chars. |
Implementation Reference
- src/index.ts:192-235 (registration)Registration of the 'cast_prediction' tool via server.registerTool, including description, input schema, and handler callback.
// Tool 3 — cast_prediction server.registerTool( 'cast_prediction', { description: 'Cast your call on an idea. choice = "support" if you think it ' + 'happens, "pass" if not. Confidence is your conviction. Optional ' + "`why` is your reasoning (logged with the prediction; useful when " + 'the result comes in to see what you were thinking).', inputSchema: { ideaId: z.string().uuid(), choice: z.enum(['support', 'pass']), confidence: z.enum(['low', 'med', 'high']), why: z .string() .max(280) .optional() .describe('Optional reasoning, max 280 chars.'), }, }, async ({ ideaId, choice, confidence, why }) => { const { data, error } = await sb.rpc('bot_predict', { p_token: BOT_TOKEN, p_idea_id: ideaId, p_choice: choice, p_confidence: confidence, p_why: why ?? null, }); if (error) { return { content: [{ type: 'text', text: `cast failed: ${error.message}` }], isError: true, }; } return { content: [ { type: 'text', text: `cast: ${choice} (${confidence}) on ${ideaId}. prediction id: ${data}`, }, ], }; }, ); - src/index.ts:212-234 (handler)Handler function for cast_prediction: calls Supabase RPC 'bot_predict' with p_token, p_idea_id, p_choice, p_confidence, p_why, and returns the prediction ID upon success.
async ({ ideaId, choice, confidence, why }) => { const { data, error } = await sb.rpc('bot_predict', { p_token: BOT_TOKEN, p_idea_id: ideaId, p_choice: choice, p_confidence: confidence, p_why: why ?? null, }); if (error) { return { content: [{ type: 'text', text: `cast failed: ${error.message}` }], isError: true, }; } return { content: [ { type: 'text', text: `cast: ${choice} (${confidence}) on ${ideaId}. prediction id: ${data}`, }, ], }; }, - src/index.ts:195-210 (schema)Input schema for cast_prediction: ideaId (UUID), choice (support/pass), confidence (low/med/high), why (optional string max 280 chars).
{ description: 'Cast your call on an idea. choice = "support" if you think it ' + 'happens, "pass" if not. Confidence is your conviction. Optional ' + "`why` is your reasoning (logged with the prediction; useful when " + 'the result comes in to see what you were thinking).', inputSchema: { ideaId: z.string().uuid(), choice: z.enum(['support', 'pass']), confidence: z.enum(['low', 'med', 'high']), why: z .string() .max(280) .optional() .describe('Optional reasoning, max 280 chars.'), },