Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
ideaIdYes
choiceYes
confidenceYes
whyNoOptional 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}`,
            },
          ],
        };
      },
    );
  • 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}`,
          },
        ],
      };
    },
  • 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.'),
      },
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It explains the behavior of choice, confidence, and why. However, it does not disclose potential side effects (e.g., immutability, limits) or what happens after submission.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences, front-loaded with the main action. Every word adds value, and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (4 params, no output schema, no annotations), the description adequately explains the purpose and parameters. It does not cover return values or errors, but the output schema is absent. Overall, it is sufficiently complete for a prediction submission tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 25% schema coverage (only 'why' described), the description adds meaning for 'choice' and 'confidence' beyond enum values (e.g., 'support if you think it happens, pass if not'). It also explains the purpose of 'why'. This compensates for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Cast your call on an idea'. It explains the choices and distinguishes from siblings (get_idea, list_open_ideas, set_my_username) which are different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context on when to use the tool (to make a prediction on an idea) and explains the parameters. It lacks explicit when-not-to-use or alternative tools, but the purpose is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Chesterguan/calledit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server