---
title: "Get the definition of symbols in a file"
method: POST
path: "/v1/devboxes/{id}/lsp/file-definition"
tags: ["ts-ls"]
---

# Get the definition of symbols in a file

`POST /v1/devboxes/{id}/lsp/file-definition`

Get the definition of a symbol at a given position in a file
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition

## Path parameters

- `id` string, required

## Request body

- FileDefinitionRequestBody
  - `character` number, double, required
  - `line` number, double, required
  - `uri` string, required

## Response `200`

The definition of the symbol at the given position

- BaseLocation[]
  - `range` BaseRange, required
    - `end` object, required
      - `character` number, double, required
      - `line` number, double, required
    - `start` object, required
      - `character` number, double, required
      - `line` number, double, required
  - `uri` string, required

---

[API](https://skmtc.dev/runloopai/apis/runloop-api.md) · [All operations](https://skmtc.dev/runloopai/apis/runloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runloopai/runloop-api/revisions/0cb966ca566f/schema)
