get_type_source
[analysis]
Read a type declaration by its exact source key.
Unreleased read-only preview. Technical reference for agents and client integrators.
Before this call
For stale_key caused by a changed or unreadable source, stabilize the file and call sync. After sync succeeds, repeat matching parser declaration discovery and retry with the new source key. If an old source key is only absent after a successful refresh, repeat matching parser declaration discovery in the current generation without another sync. Select a matching declaration kind. Type reads accept class, interface, enum, record, or annotation keys.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbolKey | string | Yes | Opaque key returned by declaration discovery in the current generation. |
Examples
Technical examples for agents and client integrators. Replace paths and opaque keys with returned workspace values.
Illustrative arguments
{
"symbolKey": "<returned-symbolKey>"
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_type_source",
"arguments": {
"symbolKey": "<returned-symbolKey>"
}
}
}Response notes
Reports declaration, text, contentVersion, returnedSpan, readMode, and outputTruncated. Source includes leading Javadoc. Lines and UTF-16 columns start at one; span ends are exclusive. CRLF is one line break. Responses have a 128 KiB UTF-8 JSON cap. Use get_file_contents windows for truncated text.