| { |
| "type": "function", |
| "function": { |
| "name": "get_context", |
| "description": "Provide the code missing in the Patch Set for context.", |
| "parameters": { |
| "type": "object", |
| "properties": { |
| "replies": { |
| "type": "array", |
| "description": "Each item in `replies` represents a context request for a single code entity.", |
| "items": { |
| "type": "object", |
| "properties": { |
| "requestType": { |
| "type": "string", |
| "enum": ["definition", "body", "other"], |
| "description": "The type of context request: `definition` requests the entity's definition (e.g., the function signature); `body` requests the full content of the entity (e.g., the function body); `other` refers to any request that doesn't fit the previous categories." |
| }, |
| "otherDescription": { |
| "type": "string", |
| "description": "If `requestType` is set to `other`, this field contains a description of the specific type of context being requested." |
| }, |
| "entityCategory": { |
| "type": "string", |
| "enum": ["callable", "data", "type"], |
| "description": "The category of the entity: `callable` includes constructs that can be invoked or executed (e.g., functions, methods, ...); `data` includes elements that can hold, represent, or assume values during program execution (e.g., variables, constants, objects, arrays, ...); `type` refers to constructs that define the structure, blueprint, or schema of data types (e.g., classes, structs, enums, interfaces, ...)." |
| }, |
| "contextRequiredEntity": { |
| "type": "string", |
| "description": "The entity for which the context is being requested." |
| }, |
| "filename": { |
| "type": "string" |
| }, |
| "lineNumber": { |
| "type": "integer" |
| }, |
| "codeSnippet": { |
| "type": "string", |
| "description": "The line of code containing the entity, from the first line character to the line break." |
| } |
| }, |
| "required": [ |
| "requestType", |
| "entityCategory", |
| "contextRequiredEntity", |
| "filename", |
| "codeSnippet" |
| ] |
| } |
| } |
| }, |
| "required": [ |
| "replies" |
| ] |
| } |
| } |
| } |