codeCompletion
Provide code completion proposals at a specific cursor position in source code. Input the source and line/column to see valid syntax, simplifying unfamiliar API calls.
Instructions
Completion proposals for a cursor position: what may be written at line/column of this source. Needs the source and the position, exactly like the editor, so it is worth having when composing a call against an unfamiliar interface; codeCompletionFull adds the insert text and codeCompletionElement the details of one proposal.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sourceUrl": "<sourceUrl>",
"source": "<source>",
"line": "<line>",
"column": "<column>"
},
"name": "codeCompletion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| column | Yes | ||
| source | Yes | ||
| sourceUrl | Yes |