Skip to main content
Glama

get_requirements

Retrieve writing requirements for manuscripts, including word counts, deadlines, formatting rules, and audience specifications, to ensure project compliance.

Instructions

Get all requirements or filter by type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoPath to manuscript directory (defaults to current directory)
requirement_typeNoFilter by requirement type
enforced_onlyNoShow only enforced requirements

Implementation Reference

  • Primary handler function for the 'get_requirements' MCP tool. Parses input arguments and delegates execution to WritersAid.getRequirements().
    private async getRequirements(args: Record<string, unknown>) {
      const requirementType = args.requirement_type as
        | "word_count"
        | "citation_style"
        | "formatting"
        | "deadline"
        | "target_audience"
        | "tone"
        | "reading_level"
        | "chapter_count"
        | "other"
        | undefined;
      const enforcedOnly = args.enforced_only as boolean | undefined;
    
      return this.writersAid.getRequirements({ requirementType, enforcedOnly });
    }
  • MCP tool schema definition including input schema, description, and parameters for 'get_requirements'.
    {
      name: "get_requirements",
      description: "Get all requirements or filter by type",
      inputSchema: {
        type: "object",
        properties: {
          project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" },
          requirement_type: {
            type: "string",
            enum: ["word_count", "citation_style", "formatting", "deadline", "target_audience", "tone", "reading_level", "chapter_count", "other"],
            description: "Filter by requirement type",
          },
          enforced_only: { type: "boolean", description: "Show only enforced requirements" },
        },
      },
    },
  • src/index.ts:73-75 (registration)
    Registers the tool list handler which provides the 'get_requirements' schema to MCP clients.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: writerToolDefinitions,
    }));
  • src/index.ts:86-91 (registration)
    Instantiates WriterToolHandlers and calls handleTool() for tool execution in the MCP CallToolRequestHandler.
    const writersAid = new WritersAid({ projectPath });
    const handlers = new WriterToolHandlers(writersAid);
    
    // Call the tool
    const result = await handlers.handleTool(name, args || {});
  • Core database query helper that retrieves requirements by type from the SQLite database.
    getRequirementsByType(requirementType: RequirementType): WritingRequirement[] {
      const rows = this.db
        .prepare(
          `SELECT id, requirement_type, description, value, enforced, created_at
           FROM writing_requirements
           WHERE requirement_type = ?
           ORDER BY created_at DESC`
        )
        .all(requirementType) as RequirementRow[];
    
      return rows.map((row) => this.rowToRequirement(row));
    }
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 retrieves requirements but doesn't describe the return format (e.g., list, structured data), pagination, error conditions, or permissions needed. For a read tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 with zero waste. It front-loads the core purpose ('Get all requirements') and adds optional functionality ('or filter by type') without unnecessary details. 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 no annotations, no output schema, and 3 parameters, the description is incomplete. It doesn't explain what 'requirements' entail (e.g., metadata, constraints), how results are structured, or error handling. For a tool that likely returns complex data (requirements with types and enforcement status), more context is needed to use it effectively.

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 fully documents all three parameters (project_path, requirement_type, enforced_only) with descriptions and an enum for requirement_type. The description adds no additional parameter semantics beyond what the schema provides, such as explaining how filters interact or default behaviors. Baseline 3 is appropriate when 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 tool's purpose: 'Get all requirements or filter by type' specifies the verb (get) and resource (requirements) with optional filtering. It distinguishes itself from siblings like 'set_requirement' (write vs. read) but doesn't explicitly differentiate from other read tools like 'get_file_context' or 'get_session_context' beyond the resource type.

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. It doesn't mention prerequisites (e.g., needing a project_path), exclusions, or compare it to other tools for retrieving requirements or context. Usage is implied by the name and description alone.

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/xiaolai/claude-writers-aid-mcp'

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