Skip to main content
Glama

get_frd

Retrieve Functional Requirements Document content by ID to enable AI-assisted generation of NestJS boilerplate architectures with core CRUD, database integration, authentication, and testing.

Instructions

Returns the content of an FRD by id. 00 -> FRD-00-master-orchestration.md 01 -> FRD-01-boilerplate-core-products.md ...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frd_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:82-96 (handler)
    Main handler function for the 'get_frd' tool. Takes an frd_id parameter (limited to '00'-'04' via Literal type), validates it against FRD_MAPPING, and returns the content of the corresponding FRD file by calling _read_frd_file helper. Decorated with @mcp.tool() to register it as an MCP tool.
    def get_frd(
        frd_id: Literal["00", "01", "02", "03", "04"]
    ) -> str:
        """
        Returns the content of an FRD by id.
        00 -> FRD-00-master-orchestration.md
        01 -> FRD-01-boilerplate-core-products.md
        ...
        """
        logger = _setup_logging()
        logger.info("Tool get_frd requested with frd_id=%s", frd_id)
        if frd_id not in FRD_MAPPING:
            raise ValueError(f"Invalid FRD id: {frd_id}")
        filename = FRD_MAPPING[frd_id]
        return _read_frd_file(filename)
  • main.py:83-84 (schema)
    Input schema/validation for get_frd tool. Uses Python's Literal type hint to restrict frd_id parameter to only allow values '00', '01', '02', '03', or '04'. Return type is defined as str.
        frd_id: Literal["00", "01", "02", "03", "04"]
    ) -> str:
  • main.py:81-81 (registration)
    Tool registration via @mcp.tool() decorator. This registers the get_frd function as an available MCP tool with the FastMCP server instance.
    @mcp.tool()
  • main.py:55-79 (helper)
    Helper function _read_frd_file that reads FRD markdown files from disk. Handles file I/O, logging, and error cases (FileNotFoundError and other exceptions). Called by get_frd to retrieve FRD content.
    def _read_frd_file(filename: str) -> str:
        """
        Reads an FRD from disk and returns it as string.
    
        Also writes logs to track which file was read,
        from which path and if there were any errors.
        """
        logger = _setup_logging()
        path = FRD_DIR / filename
        logger.info(f"Reading FRD from disk: {path}")
    
        try:
            content = path.read_text(encoding="utf-8")
            logger.debug(
                "FRD read successfully: %s (%d characters)",
                path.name,
                len(content),
            )
            return content
        except FileNotFoundError:
            logger.error("FRD not found: %s", path)
            raise
        except Exception as exc:
            logger.exception("Error reading FRD %s: %s", path, exc)
            raise
  • main.py:21-27 (helper)
    FRD_MAPPING dictionary that maps FRD IDs to their corresponding markdown filenames. Used by get_frd to translate frd_id parameter into actual file paths.
    FRD_MAPPING: Dict[str, str] = {
        "00": "FRD-00-master-orchestration.md",
        "01": "FRD-01-boilerplate-core-products.md",
        "02": "FRD-02-products-database.md",
        "03": "FRD-03-auth-security.md",
        "04": "FRD-04-unit-testing.md",
    }
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 returns content, implying a read-only operation, but lacks details on permissions, error handling, rate limits, or output format. The mention of specific FRD IDs adds some context but doesn't cover key behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, but the list of FRD ID mappings is verbose and could be condensed. While it provides useful examples, the structure is not optimally efficient, as the mappings might be better placed elsewhere or summarized.

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 simplicity (1 parameter, output schema exists), the description is somewhat complete but has gaps. It explains the purpose and parameter semantics but lacks behavioral details. The output schema handles return values, so the description doesn't need to cover that, but it should address usage and transparency more thoroughly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, but the description compensates by listing examples of FRD IDs (e.g., '00 -> FRD-00-master-orchestration.md'), which clarifies the semantics beyond the enum values. Since there is only one parameter, the baseline is 4, and the examples add meaningful context.

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: 'Returns the content of an FRD by id.' This is a specific verb ('Returns') and resource ('content of an FRD'), making the function unambiguous. However, it doesn't distinguish from siblings since there are none, so it cannot achieve a perfect 5.

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 mentions specific FRD IDs (e.g., '00 -> FRD-00-master-orchestration.md'), but this is more of an example than usage guidance. There are no explicit instructions on prerequisites, context, or exclusions.

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/jorge6242/boilerplate-nestjs-mcp'

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