# `TMCP044` get_test includes code references with is_test flag When code sources are declared in the manifest and a test has been tagged in source code, `get_test` shall include a `code_references` field with file, line, symbol, and an `is_test` boolean indicating whether the tagged symbol is an automated test implementation. :::{dropdown} Is a test for :open: :icon: check-circle-fill :color: primary [`MCP004` Get test by ID](/requirements/MCP004) ::: :::{dropdown} Automated in :open: :icon: check-circle-fill :color: success {fab}`python` [`test_get_test_with_code_references`](https://github.com/agagniere/speky/blob/master/tests/test_mcp_server.py#L773) ::: :::{dropdown} Source :icon: file-code :color: info __Source file__: [`specs/mcp/test_12.yaml`](https://github.com/agagniere/speky/blob/master/specs/mcp/test_12.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_test` for a test that has code references ```json { "id": 2, "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "get_test", "arguments": {"id": "T01"} } } ``` ### Step 2 Verify the response includes `code_references` with `is_test` set to true for automated test functions, and false for non-test symbols. ```json { "id": 2, "jsonrpc": "2.0", "result": { "structuredContent": { "category": "functional", "id": "T01", "long": "The first test", "ref": [{"id": "RF01"}], "steps": [], "code_references": [ {"file": "tests/test_feature.py", "line": 12, "symbol": "test_my_function", "is_test": true} ] } } } ```