Skip to main content
Glama
yvanfreitas

MCP Test Server

by yvanfreitas

get_tasks

Retrieve and filter tasks from a database by status or assigned user to manage workflow and track progress.

Instructions

Get all tasks from the mock database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter tasks by status
assignedToNoFilter tasks by assigned user ID

Implementation Reference

  • Executes the get_tasks tool logic by filtering tasks based on optional status and assignedTo parameters from mock data.
    static getAll(filters = {}) {
      let filteredTasks = tasks;
      
      if (filters.status) {
        filteredTasks = filteredTasks.filter(task => task.status === filters.status);
      }
      
      if (filters.assignedTo) {
        filteredTasks = filteredTasks.filter(task => task.assignedTo === filters.assignedTo);
      }
    
      return {
        success: true,
        data: filteredTasks,
        total: filteredTasks.length
      };
    }
  • Defines the input schema for the get_tasks tool, specifying optional filters for status (enum) and assignedTo (number).
    {
      name: 'get_tasks',
      description: 'Get all tasks from the mock database',
      inputSchema: {
        type: 'object',
        properties: {
          status: {
            type: 'string',
            description: 'Filter tasks by status',
            enum: ['pending', 'in-progress', 'completed']
          },
          assignedTo: {
            type: 'number',
            description: 'Filter tasks by assigned user ID'
          }
        }
      }
    },
  • mcp-server.js:38-46 (registration)
    Registers the get_tasks tool schema by including taskToolSchemas in the response to ListToolsRequest.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          ...userToolSchemas,
          ...taskToolSchemas,
          searchToolSchema
        ]
      };
    });
  • mcp-server.js:60-61 (registration)
    Handles incoming calls to the get_tasks tool by dispatching to TaskService.getAll with the provided arguments.
    case 'get_tasks':
      return createMcpResponse(TaskService.getAll(args));
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 'Get all tasks' but doesn't mention whether this is a read-only operation, if it requires authentication, how results are returned (e.g., pagination, format), or potential rate limits. For a retrieval tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse. Every part of the sentence earns its place by conveying essential information.

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?

Given the tool's low complexity (simple retrieval with two optional filters), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, usage context, and return values. For a tool with no output schema, it should ideally hint at the response format, but it doesn't, leaving room for improvement.

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 input schema has 100% description coverage, with clear documentation for both parameters ('status' with enum values and 'assignedTo' as user ID). The description doesn't add any meaning beyond the schema—it doesn't explain parameter interactions, default behaviors, or usage examples. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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 action ('Get') and resource ('all tasks from the mock database'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'get_task' (singular) or 'search', which could also retrieve tasks. The description is specific but lacks sibling differentiation.

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 versus alternatives like 'get_task' (for a single task), 'search' (for more complex queries), or 'create_task' (for adding tasks). It mentions 'all tasks' but doesn't clarify if this is the default listing tool or when filtering via parameters is appropriate.

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/yvanfreitas/MCP-test'

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