# `TMCP005` get_requirement with all fields Query a requirement that has all optional fields populated :::{dropdown} Is a test for :open: :icon: check-circle-fill :color: primary [`MCP003` Get requirement by ID](/requirements/MCP003) ::: :::{dropdown} Automated in :open: :icon: check-circle-fill :color: success {fab}`python` [`test_get_requirement_all_fields`](https://github.com/agagniere/speky/blob/master/tests/test_mcp_server.py#L135) ::: :::{dropdown} Source :icon: file-code :color: info __Source file__: [`specs/mcp/test_03.yaml`](https://github.com/agagniere/speky/blob/master/specs/mcp/test_03.yaml) __Loaded from__: [`speky_mcp`](https://github.com/agagniere/speky/blob/master/specs/mcp/mcp.toml) ::: ## Initial state The expected state is the final state of [`TMCP003` Initialize the MCP server](/tests/TMCP003) ## Procedure ### Step 1 Call `get_requirement` tool with ID `RF03` ```json { "id": 2, "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "get_requirement", "arguments": {"id": "RF03"} } } ``` ### Step 2 Verify response contains all expected fields: - id: `RF03` - category: non-functional - short: "Number 3" - long: "The third requirement !" - client_statement: "I want a requirement will all fields" - properties: author, since, version - tags: `foo`, `bar:baz` - ref and referenced_by: `RF04` - tested_by: `T03` and `T04` - comments: 3 comments ```json { "id": 2, "jsonrpc": "2.0", "result": { "structuredContent": { "category": "non-functional", "client_statement": "I want a requirement will all fields", "comments": [ { "date": "03/01/2025", "external": false, "from": "Mr. Author", "text": "I wrote that" }, { "date": "03/01/2025", "external": true, "from": "Observer", "text": "I can see that" }, { "date": "03/01/2025", "external": false, "from": "Mr. Author", "text": "Good" } ], "id": "RF03", "long": "The third requirement !", "properties": { "author": "Mr. Author", "since": "`1.0.0`", "version": 2 }, "ref": [{"id": "RF04"}], "referenced_by": [{"id": "RF04"}], "short": "Number 3", "tags": ["foo", "bar:baz"], "tested_by": [ {"id": "T03", "short": "Create files"}, {"id": "T04", "short": "Yet another test"} ] } } } ```