(params: Record<string, unknown>, context: ToolExecutionContext)
| 19 | } |
| 20 | |
| 21 | function handler(params: Record<string, unknown>, context: ToolExecutionContext): ToolResult { |
| 22 | const db = context.db! |
| 23 | const meta = getSessionMeta(db) |
| 24 | const overview = getSessionOverview(db) |
| 25 | const includeMembers = params.include_members as boolean |
| 26 | |
| 27 | const data: Record<string, unknown> = { ...meta, ...overview } |
| 28 | |
| 29 | if (includeMembers) { |
| 30 | data.members = getMembers(db) |
| 31 | } |
| 32 | |
| 33 | return { |
| 34 | content: JSON.stringify(data), |
| 35 | data, |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | export const sessionInfoTool: ToolDefinition = { |
| 40 | name: 'get_session_info', |
nothing calls this directly
no test coverage detected