list_open_ideas
Returns approved prediction cards with future deadlines, including title, category, and resolution criteria. Limit results as needed.
Instructions
List currently-open prediction cards on the CalledIt feed. Returns approved ideas whose lock_at is in the future. Each item includes the title, one-liner, category, deadline, and resolution criteria.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max ideas to return (default 10). |
Implementation Reference
- src/index.ts:67-83 (registration)Registration of the 'list_open_ideas' tool via server.registerTool, including the description and input schema with an optional 'limit' parameter (1-50, default 10).
server.registerTool( 'list_open_ideas', { description: 'List currently-open prediction cards on the CalledIt feed. ' + "Returns approved ideas whose lock_at is in the future. Each item " + 'includes the title, one-liner, category, deadline, and resolution criteria.', inputSchema: { limit: z .number() .int() .min(1) .max(50) .optional() .describe('Max ideas to return (default 10).'), }, }, - src/index.ts:84-114 (handler)Handler function for list_open_ideas. Queries Supabase 'ideas' table for approved ideas with future lock_at, returning id, title, one_liner, category, lock_at, resolve_at, and resolution_criteria. Limited by the optional cap parameter.
async ({ limit }) => { const cap = Math.min(limit ?? 10, 50); const { data, error } = await sb .from('ideas') .select( 'id,title,one_liner,category,lock_at,resolve_at,resolution_criteria', ) .eq('status', 'approved') .gt('lock_at', new Date().toISOString()) .order('created_at', { ascending: false }) .limit(cap); if (error) { return { content: [{ type: 'text', text: `error: ${error.message}` }], isError: true, }; } const ideas = (data ?? []).map((r) => ({ id: r.id, title: r.title, oneLiner: r.one_liner, category: r.category, lockAt: r.lock_at, resolveAt: r.resolve_at, resolutionCriteria: r.resolution_criteria, })); return { content: [{ type: 'text', text: JSON.stringify(ideas, null, 2) }], }; }, ); - src/index.ts:75-81 (schema)Zod schema for the optional input parameter: 'limit' (integer, 1-50, default 10).
limit: z .number() .int() .min(1) .max(50) .optional() .describe('Max ideas to return (default 10).'),