get_symbol
Read the full indexed source of a named function, method, class, or type, with qualified name and line range. Use it when the symbol name is known instead of searching code or opening files.
Instructions
Read the full source of a named definition (function, method, class, type) when you know its name, for example from a search_code hit. Use this instead of search_code when the name is known, and instead of opening files: it returns the source exactly as it was indexed. A bare name returns every definition with that name, each labeled with its qualified name; pass a qualified name or a repo to narrow. Returns up to 5 matches, each with its qualified name, kind, repository, path, line range and source. A source longer than 400 lines is cut there and marked cut, and its full line range is still given. total is the number of matches and truncated is true when more than 5 matched. Unparsed files indexed as line windows have no names and are not found here; use search_code for them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A bare name (url_for), which matches url_for and every Class.url_for, or a qualified name (Flask.url_for), which matches only that definition. Case-sensitive. | |
| repo | No | Look only in this registered repository, for example flask. list_repositories gives the valid names. Default: all repositories. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | No | ||
| reason | Yes | ||
| status | Yes | ||
| results | Yes | ||
| truncated | No |