Skip to main content
Glama
loaditoutadmin

loaditout-mcp-server

Official

validate_action

Pre-flight safety check for a skill action: validates security grade, detects parameter injection, and returns safe_to_proceed. Use before executing actions with side effects.

Instructions

Pre-flight safety check before executing an action on a skill. Returns a validation result with safe_to_proceed (boolean), risk_level, security_grade, warnings array, and whether the skill is verified. Checks the skill's security grade, safety manifest, parameter injection patterns, and how recently it was updated. Use this before calling any skill action that could have side effects (writes, deletes, network requests). Do not skip this step for skills with security grade C or F.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesSkill slug in owner/repo format. Examples: 'supabase/mcp', 'microsoft/playwright-mcp'. Must be a valid slug from the registry.
actionYesThe specific action about to be performed on the skill. Examples: 'query_database', 'write_file', 'send_email', 'delete_record'. Use the actual tool/action name the skill provides.
parametersNoThe parameters that will be passed to the action. These are scanned for prompt injection patterns. Pass the exact parameters you intend to use. Omit if the action takes no parameters.

Implementation Reference

  • Tool registration/schema for validate_action, defining input parameters slug, action, and optional parameters.
    {
      name: "validate_action",
      description:
        "Validate whether an action on a skill is safe before executing it. Checks security grade, safety manifest, parameter injection, and skill freshness.",
      inputSchema: {
        type: "object" as const,
        properties: {
          slug: {
            type: "string",
            description:
              "Skill slug in owner/repo format. Example: 'supabase/mcp'",
          },
          action: {
            type: "string",
            description:
              "The action about to be performed. Example: 'query_database'",
          },
          parameters: {
            type: "object",
            description:
              "Parameters that will be passed to the action. Checked for injection patterns.",
          },
        },
        required: ["slug", "action"],
      },
    },
  • Handler function that POSTs to /api/agent/validate with slug, action, and optional parameters, then formats the validation result including validity, risk level, security grade, skill verification, last updated, and warnings.
    async function handleValidateAction(args: {
      slug: string;
      action: string;
      parameters?: Record<string, unknown>;
    }): Promise<string> {
      const body: Record<string, unknown> = {
        slug: args.slug,
        action: args.action,
        agent_key: AGENT_KEY,
      };
      if (args.parameters) {
        body.parameters = args.parameters;
      }
    
      const result = (await postJSON(`${API_BASE}/validate`, body)) as {
        valid?: boolean;
        risk_level?: string;
        security_grade?: string;
        warnings?: string[];
        skill_verified?: boolean;
        last_updated_days_ago?: number;
        error?: string;
      };
    
      if (result.error) {
        return `Validation failed: ${result.error}`;
      }
    
      const lines = [
        `Validation result for ${args.slug} / ${args.action}:`,
        `  Safe to proceed: ${result.valid ? "YES" : "NO"}`,
        `  Risk level: ${result.risk_level ?? "unknown"}`,
        `  Security grade: ${result.security_grade ?? "unknown"}`,
        `  Skill verified: ${result.skill_verified ? "yes" : "no"}`,
      ];
    
      if (result.last_updated_days_ago !== undefined) {
        lines.push(`  Last updated: ${result.last_updated_days_ago} days ago`);
      }
    
      const warnings = result.warnings ?? [];
      if (warnings.length > 0) {
        lines.push(`  Warnings:`);
        for (const w of warnings) {
          lines.push(`    - ${w}`);
        }
      }
    
      return lines.join("\n");
    }
  • Dispatch/call site for validate_action in the tools/call handler switch statement.
    case "validate_action":
      resultText = await handleValidateAction(
        toolArgs as {
          slug: string;
          action: string;
          parameters?: Record<string, unknown>;
        }
      );
      break;
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses checks performed and return fields. Missing details like side effects, error handling, or prerequisites, but overall sufficient for a read-only validation tool.

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?

Concise, front-loaded purpose, then methods, then usage instruction. No wasted sentences.

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 no annotations, no output schema, and 3 parameters (2 required, nested object), the description is fairly complete. It covers purpose, checks, return fields, and usage. Lacks info on what happens on failure or prerequisites, but acceptable.

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?

Input schema has 100% coverage with parameter descriptions. Description adds minimal extra context (e.g., 'Pass the exact parameters you intend to use'). Baseline 3 is appropriate as schema already documents parameters well.

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 it is a 'pre-flight safety check' before executing an action on a skill, listing what it returns (validation result with fields) and what it checks (security grade, safety manifest, injection patterns, recency). This distinguishes it from siblings like check_permission and check_capability_gap.

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

Usage Guidelines5/5

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

Explicitly says 'Use this before calling any skill action that could have side effects' and 'Do not skip this step for skills with security grade C or F,' providing clear when-to-use and when-not-to-skip guidance.

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/loaditoutadmin/loaditout-mcp-server'

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