get_session
Retrieve full details of an exploratory session including mission, status, assignee, linked release, attachments, issues, and findings by providing the session ID.
Instructions
Get the full details of one exploratory session: name, mission, status, assignee, linked release, attachments, linked issues, findings. sessionId accepts either the internal _id or a counter-style ID like 'SES-12'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID (required). | |
| sessionId | Yes | Internal _id or counter-style ID (required). |
Implementation Reference
- src/tools/sessions/get-session.ts:31-56 (handler)The main handler function for the get_session tool. It validates args, calls the API endpoint, and returns the session details as JSON text content.
export async function handleGetSession(args?: GetSessionArgs) { const token = getApiKey(args); if (!token) { throw new Error( "Missing TESTDINO_PAT environment variable. Configure it in your .cursor/mcp.json under 'env'." ); } if (!args?.projectId) throw new Error("projectId is required"); if (!args?.sessionId) throw new Error("sessionId is required"); try { const url = endpoints.getSession({ projectId: args.projectId, sessionId: args.sessionId, }); const response = await apiRequestJson<unknown>(url, { headers: { Authorization: `Bearer ${token}` }, }); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); throw new Error(`Failed to get session: ${msg}`); } } - The TypeScript interface (GetSessionArgs) and inputSchema for the get_session tool defining required fields: projectId and sessionId.
interface GetSessionArgs { projectId: string; sessionId: string; } export const getSessionTool = { name: "get_session", description: "Get the full details of one exploratory session: name, mission, status, assignee, linked release, attachments, linked issues, findings. sessionId accepts either the internal _id or a counter-style ID like 'SES-12'.", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "Project ID (required)." }, sessionId: { type: "string", description: "Internal _id or counter-style ID (required).", }, }, required: ["projectId", "sessionId"], }, }; - src/tools/sessions/get-session.ts:14-16 (registration)The tool definition object (getSessionTool) that registers 'get_session' as a named tool with description and input schema.
export const getSessionTool = { name: "get_session", description: - src/index.ts:333-337 (registration)The handler routing in the main server: when tool name is 'get_session', calls handleGetSession with the parsed args.
if (name === "get_session") { return await handleGetSession( args as Parameters<typeof handleGetSession>[0] ); } - src/lib/endpoints.ts:498-502 (helper)The URL builder helper that constructs the API endpoint path for a session: GET /api/mcp/sessions/:projectId/:sessionId.
getSession: (params: { projectId: string; sessionId: string }): string => { const baseUrl = getBaseUrl(); const { projectId, sessionId } = params; return `${baseUrl}/api/mcp/sessions/${projectId}/${sessionId}`; },