Skip to main content
Glama

create_session

Create a new exploratory testing session with project ID and name, and optional mission, assignee, estimate, and tags.

Instructions

Create a new exploratory testing session. Requires write permission. mission accepts rich HTML (the high-level charter). assigneeUserId accepts either a User _id ("user_abc...") or an email address — the email is resolved against TestDino users automatically. estimate is in minutes. Findings cannot be created here — add them in the UI. IMPORTANT: tags must be a JSON array of strings — e.g. ["exploratory","auth"] — NOT the comma-separated form that list_sessions accepts as a filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID (required).
nameYesSession name (required).
missionNoRich HTML mission/charter.
sessionTypeNoFree-text type, e.g. 'Exploratory'.
configNo
environmentNo
releaseIdNoAttach session to this release.
assigneeUserIdNoUser _id ("user_abc...") OR email address — both accepted. Email is looked up server-side.
stateNoWorkflow state (default 'new'). Either canonical ('under_review') or display ('Under review') form — server normalizes to lowercase+underscored so UI colors render correctly.
estimateNoEstimate in minutes.
tagsNoArray of tag strings, e.g. ["exploratory","auth"]. NOT a comma-separated string.
linkedIssuesNoArray of linked-issue objects.
attachmentsNoArray of attachment objects or URLs.

Implementation Reference

  • The main handler function that executes the 'create_session' tool. Validates API key, extracts projectId, calls the endpoint via POST, and returns the response as text content.
    export async function handleCreateSession(args?: CreateSessionArgs) {
      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?.name) throw new Error("name is required");
    
      try {
        const { projectId, ...body } = args;
        const url = endpoints.createSession(String(projectId));
        const response = await apiRequestJson<unknown>(url, {
          method: "POST",
          headers: { Authorization: `Bearer ${token}` },
          body,
        });
        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 create session: ${msg}`);
      }
    }
  • TypeScript interface (CreateSessionArgs) and the inputSchema definition for the tool. Defines all parameters: projectId (required), name (required), mission, sessionType, config, environment, releaseId, assigneeUserId, state, estimate, tags, linkedIssues, attachments.
    interface CreateSessionArgs {
      projectId: string;
      name: string;
      mission?: string;
      sessionType?: string;
      config?: string;
      environment?: string;
      releaseId?: string;
      assigneeUserId?: string;
      state?: string;
      estimate?: number;
      tags?: string[];
      linkedIssues?: unknown[];
      attachments?: unknown[];
    }
    
    export const createSessionTool = {
      name: "create_session",
      description:
        'Create a new exploratory testing session. Requires write permission. mission accepts rich HTML (the high-level charter). assigneeUserId accepts either a User _id ("user_abc...") or an email address — the email is resolved against TestDino users automatically. estimate is in minutes. Findings cannot be created here — add them in the UI. IMPORTANT: tags must be a JSON array of strings — e.g. ["exploratory","auth"] — NOT the comma-separated form that list_sessions accepts as a filter.',
      inputSchema: {
        type: "object",
        properties: {
          projectId: { type: "string", description: "Project ID (required)." },
          name: { type: "string", description: "Session name (required)." },
          mission: { type: "string", description: "Rich HTML mission/charter." },
          sessionType: {
            type: "string",
            description: "Free-text type, e.g. 'Exploratory'.",
          },
          config: { type: "string" },
          environment: { type: "string" },
          releaseId: {
            type: "string",
            description: "Attach session to this release.",
          },
          assigneeUserId: {
            type: "string",
            description:
              'User _id ("user_abc...") OR email address — both accepted. Email is looked up server-side.',
          },
          state: {
            type: "string",
            description:
              "Workflow state (default 'new'). Either canonical ('under_review') or display ('Under review') form — server normalizes to lowercase+underscored so UI colors render correctly.",
          },
          estimate: { type: "number", description: "Estimate in minutes." },
          tags: {
            type: "array",
            items: { type: "string" },
            description:
              'Array of tag strings, e.g. ["exploratory","auth"]. NOT a comma-separated string.',
          },
          linkedIssues: {
            type: "array",
            items: {},
            description: "Array of linked-issue objects.",
          },
          attachments: {
            type: "array",
            items: {},
            description: "Array of attachment objects or URLs.",
          },
        },
        required: ["projectId", "name"],
      },
    };
  • The tool registration object (createSessionTool) with name 'create_session', description, and inputSchema. Also exported for use in the main server.
    export const createSessionTool = {
      name: "create_session",
      description:
        'Create a new exploratory testing session. Requires write permission. mission accepts rich HTML (the high-level charter). assigneeUserId accepts either a User _id ("user_abc...") or an email address — the email is resolved against TestDino users automatically. estimate is in minutes. Findings cannot be created here — add them in the UI. IMPORTANT: tags must be a JSON array of strings — e.g. ["exploratory","auth"] — NOT the comma-separated form that list_sessions accepts as a filter.',
      inputSchema: {
        type: "object",
        properties: {
          projectId: { type: "string", description: "Project ID (required)." },
          name: { type: "string", description: "Session name (required)." },
          mission: { type: "string", description: "Rich HTML mission/charter." },
          sessionType: {
            type: "string",
            description: "Free-text type, e.g. 'Exploratory'.",
          },
          config: { type: "string" },
          environment: { type: "string" },
          releaseId: {
            type: "string",
            description: "Attach session to this release.",
          },
          assigneeUserId: {
            type: "string",
            description:
              'User _id ("user_abc...") OR email address — both accepted. Email is looked up server-side.',
          },
          state: {
            type: "string",
            description:
              "Workflow state (default 'new'). Either canonical ('under_review') or display ('Under review') form — server normalizes to lowercase+underscored so UI colors render correctly.",
          },
          estimate: { type: "number", description: "Estimate in minutes." },
          tags: {
            type: "array",
            items: { type: "string" },
            description:
              'Array of tag strings, e.g. ["exploratory","auth"]. NOT a comma-separated string.',
          },
          linkedIssues: {
            type: "array",
            items: {},
            description: "Array of linked-issue objects.",
          },
          attachments: {
            type: "array",
            items: {},
            description: "Array of attachment objects or URLs.",
          },
        },
        required: ["projectId", "name"],
      },
    };
  • src/index.ts:128-128 (registration)
    The 'createSessionTool' is included in the tools array registered with the MCP server, making it available via ListToolsRequestSchema.
    createSessionTool,
  • src/index.ts:338-341 (registration)
    The tool call handler dispatches to handleCreateSession when the tool name is 'create_session'.
    if (name === "create_session") {
      return await handleCreateSession(
        args as Parameters<typeof handleCreateSession>[0]
      );
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but description covers write permission, rich HTML for mission, minutes for estimate, dual input for assigneeUserId, state normalization, and tags format. Lacks mention of return value or error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with key details front-loaded, but could be more concise with bullet points. No redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers most critical aspects given 13 parameters and no output schema, but lacks return value description and error handling details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds significant value beyond schema: explains rich HTML for mission, email resolution for assigneeUserId, minutes for estimate, display vs canonical state forms, and provides explicit tags examples with a warning against comma-separated strings.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it creates a new exploratory testing session, differentiating from sibling create tools like create_manual_run or create_release.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states permission requirement, clarifies that findings cannot be created via this tool, and warns about the tags format difference from list_sessions, guiding correct usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/testdino-hq/testdino-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server