Skip to main content
POST
/
symbol
/
find-definition
Get the definition of a symbol at a specific position in a file
curl --request POST \
  --url http://localhost:4444/v1/symbol/find-definition \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "include_raw_response": false,
  "include_source_code": false,
  "position": {
    "path": "src/main.py",
    "position": {
      "character": 5,
      "line": 10
    }
  }
}'
{
  "definitions": [
    {
      "path": "src/main.py",
      "position": {
        "character": 5,
        "line": 10
      }
    }
  ],
  "raw_response": "<any>",
  "selected_identifier": {
    "file_range": {
      "path": "src/main.py",
      "range": {
        "end": {
          "character": 5,
          "line": 10
        },
        "start": {
          "character": 5,
          "line": 10
        }
      }
    },
    "kind": "<string>",
    "name": "<string>"
  },
  "source_code_context": [
    {
      "range": {
        "path": "src/main.py",
        "range": {
          "end": {
            "character": 5,
            "line": 10
          },
          "start": {
            "character": 5,
            "line": 10
          }
        }
      },
      "source_code": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Body

application/json
position
object
required
include_raw_response
boolean
Example:
include_source_code
boolean
Example:

Response

definitions
object[]
required
selected_identifier
object
required
raw_response
any
source_code_context
object[] | null