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)); }

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