Skip to main content
Glama
robhunter

agentdeals

plan_stack

Get infrastructure recommendations, cost estimates, or full audits for your project. Describe your use case for free-tier stack suggestions, or analyze existing services to identify costs and risks.

Instructions

Get stack recommendations, cost estimates, or a full infrastructure audit. Describe what you're building to get a free-tier stack, or pass your current services to estimate costs and find risks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesrecommend: free-tier stack for a use case. estimate: cost analysis at scale. audit: risk + cost + gap analysis.
use_caseNoWhat you're building (for recommend mode, e.g. 'Next.js SaaS app')
servicesNoCurrent vendor names (for estimate/audit mode, e.g. ['Vercel', 'Supabase'])
scaleNoScale for cost estimation (default: hobby)
requirementsNoSpecific infra needs for recommend mode (e.g. ['database', 'auth', 'email'])

Implementation Reference

  • The 'plan_stack' tool is registered and implemented in 'src/server.ts'. It handles three modes ('recommend', 'estimate', 'audit') and calls corresponding helper functions ('getStackRecommendation', 'estimateCosts', 'auditStack').
    server.registerTool(
      "plan_stack",
      {
        description:
          "Get stack recommendations, cost estimates, or a full infrastructure audit. Describe what you're building to get a free-tier stack, or pass your current services to estimate costs and find risks.",
        inputSchema: {
          mode: z.enum(["recommend", "estimate", "audit"]).describe("recommend: free-tier stack for a use case. estimate: cost analysis at scale. audit: risk + cost + gap analysis."),
          use_case: z.string().optional().describe("What you're building (for recommend mode, e.g. 'Next.js SaaS app')"),
          services: z.array(z.string()).optional().describe("Current vendor names (for estimate/audit mode, e.g. ['Vercel', 'Supabase'])"),
          scale: z.enum(["hobby", "startup", "growth"]).optional().describe("Scale for cost estimation (default: hobby)"),
          requirements: z.array(z.string()).optional().describe("Specific infra needs for recommend mode (e.g. ['database', 'auth', 'email'])"),
        },
      },
      async ({ mode, use_case, services, scale, requirements }) => {
        try {
          recordToolCall("plan_stack");
    
          if (mode === "recommend") {
            if (!use_case) {
              return {
                isError: true,
                content: [{ type: "text" as const, text: "use_case is required for recommend mode" }],
              };
            }
            const result = getStackRecommendation(use_case, requirements);
            logRequest({ ts: new Date().toISOString(), type: "mcp", endpoint: "plan_stack", params: { mode, use_case, requirements }, result_count: result.stack.length, session_id: getSessionId?.() });
            return {
              content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
            };
          }
    
          if (mode === "estimate") {
            if (!services || services.length === 0) {
              return {
                isError: true,
                content: [{ type: "text" as const, text: "services is required for estimate mode" }],
              };
            }
            const result = estimateCosts(services, scale ?? "hobby");
            logRequest({ ts: new Date().toISOString(), type: "mcp", endpoint: "plan_stack", params: { mode, services, scale: scale ?? "hobby" }, result_count: result.services.length, session_id: getSessionId?.() });
            return {
              content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
            };
          }
    
          if (mode === "audit") {
            if (!services || services.length === 0) {
              return {
                isError: true,
                content: [{ type: "text" as const, text: "services is required for audit mode" }],
              };
            }
            const result = auditStack(services);
            logRequest({ ts: new Date().toISOString(), type: "mcp", endpoint: "plan_stack", params: { mode, services }, result_count: result.services_analyzed, session_id: getSessionId?.() });
            return {
              content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
            };
          }
    
          return {
            isError: true,
            content: [{ type: "text" as const, text: `Unknown mode: ${mode}` }],
          };
        } catch (err) {
          console.error("plan_stack error:", err);
          return {
            isError: true,
            content: [{ type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}` }],
          };
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool provides 'free-tier stack' recommendations and 'risk + cost + gap analysis' in audit mode, which adds useful context about what the tool delivers. However, it doesn't disclose important behavioral traits like rate limits, authentication requirements, or what format the output takes.

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 efficiently structured in two sentences that each serve distinct purposes: the first states the core functionality, the second provides usage guidance. Every word earns its place with no redundancy or fluff.

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

Completeness3/5

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

For a tool with 5 parameters, no annotations, and no output schema, the description provides adequate but incomplete context. It explains what the tool does and gives basic usage guidance, but doesn't cover important aspects like output format, error conditions, or detailed behavioral characteristics that would be needed for optimal agent use.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds some context about parameter usage ('Describe what you're building' relates to use_case, 'pass your current services' relates to services), but doesn't provide significant additional semantic meaning beyond what's in the schema descriptions.

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 with specific verbs ('Get stack recommendations, cost estimates, or a full infrastructure audit') and distinguishes it from siblings by focusing on planning/analysis rather than comparison, searching, or tracking. It explains what the tool does in concrete terms.

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 clear context for when to use different modes ('Describe what you're building to get a free-tier stack, or pass your current services to estimate costs and find risks'), but doesn't explicitly mention when NOT to use it or name specific alternatives among sibling tools. The guidance is helpful but not exhaustive.

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/robhunter/agentdeals'

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