Skip to main content
Glama
boorich

MCP Human Loop Server

by boorich

evaluate_need_for_human

Determine if a task requires human intervention by analyzing task descriptions and model capabilities, ensuring optimal workflow between AI and human input.

Instructions

Evaluate if a task requires human intervention

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelCapabilitiesNoList of model capabilities
taskDescriptionYesDescription of the task to be evaluated

Implementation Reference

  • MCP CallToolRequest handler for the 'evaluate_need_for_human' tool. Validates tool name, extracts input arguments, invokes TaskEvaluator, and returns the result as JSON text content.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      if (request.params.name !== "evaluate_need_for_human") {
        throw new Error("Unknown tool");
      }
    
      const taskDescription = String(request.params.arguments?.taskDescription);
      const modelCapabilities = Array.isArray(request.params.arguments?.modelCapabilities) 
        ? request.params.arguments?.modelCapabilities 
        : [];
    
      const evaluation = TaskEvaluator.evaluateTask(taskDescription, modelCapabilities);
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify(evaluation, null, 2)
        }]
      };
    });
  • Core tool logic implementation. Orchestrates evaluation by calculating task factors, determining human need, confidence, reason, suggested action, statements, and questions.
    static evaluateTask(taskDescription: string, modelCapabilities: string[] = []): EvaluationResult {
      const factors = this.calculateFactors(taskDescription, modelCapabilities);
      const needsHuman = this.determineHumanNeed(factors);
      const confidence = this.calculateConfidence(factors);
      
      return {
        needsHuman,
        confidence,
        reason: this.generateReason(factors, needsHuman),
        suggestedAction: this.determineSuggestedAction(factors, needsHuman),
        confidentStatements: this.generateConfidentStatements(taskDescription, factors, needsHuman),
        humanQuestions: this.generateHumanQuestions(factors, needsHuman)
      };
    }
  • Input schema definition for the 'evaluate_need_for_human' tool, specifying taskDescription as required and modelCapabilities as optional array of strings.
    inputSchema: {
      type: "object",
      properties: {
        taskDescription: {
          type: "string",
          description: "Description of the task to be evaluated"
        },
        modelCapabilities: {
          type: "array",
          items: { type: "string" },
          description: "List of model capabilities"
        }
      },
      required: ["taskDescription"]
    }
  • src/index.ts:26-46 (registration)
    Registers the 'evaluate_need_for_human' tool in the ListToolsRequest handler, providing name, description, and full input schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [{
        name: "evaluate_need_for_human",
        description: "Evaluate if a task requires human intervention",
        inputSchema: {
          type: "object",
          properties: {
            taskDescription: {
              type: "string",
              description: "Description of the task to be evaluated"
            },
            modelCapabilities: {
              type: "array",
              items: { type: "string" },
              description: "List of model capabilities"
            }
          },
          required: ["taskDescription"]
        }
      }]
    }));
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool evaluates tasks but doesn't explain how it performs this evaluation, what criteria it uses, whether it requires specific permissions, or what the output format looks like. For a tool with zero annotation coverage, this leaves critical behavioral traits unspecified.

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 a single, clear sentence: 'Evaluate if a task requires human intervention.' It is front-loaded with the core purpose, has zero wasted words, and is appropriately sized for the tool's function. Every word earns its place.

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

Completeness2/5

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

Given the complexity of evaluating human intervention needs, the description is incomplete. No annotations are provided to clarify behavior, and there's no output schema to explain return values. The description alone doesn't cover how the evaluation works, what the output indicates, or any limitations, making it insufficient for effective 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?

The schema description coverage is 100%, meaning the input schema already documents both parameters ('modelCapabilities' and 'taskDescription') with clear descriptions. The tool description adds no additional meaning beyond what the schema provides, such as explaining how these parameters influence the evaluation. With high schema coverage, the baseline score of 3 is appropriate.

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

Purpose4/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: 'Evaluate if a task requires human intervention.' It uses a specific verb ('evaluate') and identifies the resource being evaluated (a task's need for human intervention). However, with no sibling tools mentioned, there's no opportunity to differentiate from alternatives, which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool. It doesn't specify the context in which evaluation is needed, what types of tasks are appropriate, or any prerequisites. Without siblings, there's no need to distinguish from alternatives, but the lack of any usage context is a significant gap.

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

Related 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/boorich/mcp-human-loop'

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