Skip to main content
Glama

update_session

Modify an exploratory session by sending only the fields to change. Update name, mission, assignee, tags, and more.

Instructions

Modify an existing exploratory session. Send only the fields you want to change inside the updates object. Requires write permission. Allowed fields: name, mission, sessionType, config, environment, releaseId, assigneeUserId, state, estimate, tags, linkedIssues, attachments. Findings are not editable here. updates.assigneeUserId accepts either a User _id or an email address. IMPORTANT: updates.tags must be a JSON array of strings — e.g. ["exploratory","auth"] — NOT a comma-separated string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID (required).
sessionIdYesInternal _id or counter-style ID (required).
updatesYesFields to update: name, mission, sessionType, config, environment, releaseId, assigneeUserId, state, estimate, tags, linkedIssues, attachments.

Implementation Reference

  • Main handler function for the update_session tool. Validates inputs (projectId, sessionId, updates), retrieves the API key, constructs the PATCH URL via endpoints.updateSession(), and sends the request via apiRequestJson with Bearer token auth. Returns the response as text content or throws an error on failure.
    export async function handleUpdateSession(args?: UpdateSessionArgs) {
      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");
      if (!args?.updates || typeof args.updates !== "object") {
        throw new Error("updates must be an object containing fields to modify");
      }
    
      try {
        const url = endpoints.updateSession(
          String(args.projectId),
          String(args.sessionId)
        );
        const response = await apiRequestJson<unknown>(url, {
          method: "PATCH",
          headers: { Authorization: `Bearer ${token}` },
          body: { updates: args.updates },
        });
        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 update session: ${msg}`);
      }
    }
  • TypeScript interface defining the input arguments: projectId (string), sessionId (string), and updates (Record<string, unknown>).
    interface UpdateSessionArgs {
      projectId: string;
      sessionId: string;
      updates: Record<string, unknown>;
    }
  • Tool definition object with name 'update_session', description, and inputSchema (JSON Schema) requiring projectId, sessionId, and updates as an object.
    export const updateSessionTool = {
      name: "update_session",
      description:
        'Modify an existing exploratory session. Send only the fields you want to change inside the `updates` object. Requires write permission. Allowed fields: name, mission, sessionType, config, environment, releaseId, assigneeUserId, state, estimate, tags, linkedIssues, attachments. Findings are not editable here. updates.assigneeUserId accepts either a User _id or an email address. IMPORTANT: updates.tags must be a JSON array of strings — e.g. ["exploratory","auth"] — NOT a comma-separated string.',
      inputSchema: {
        type: "object",
        properties: {
          projectId: { type: "string", description: "Project ID (required)." },
          sessionId: {
            type: "string",
            description: "Internal _id or counter-style ID (required).",
          },
          updates: {
            type: "object",
            description:
              "Fields to update: name, mission, sessionType, config, environment, releaseId, assigneeUserId, state, estimate, tags, linkedIssues, attachments.",
          },
        },
        required: ["projectId", "sessionId", "updates"],
      },
    };
  • src/index.ts:343-347 (registration)
    Tool routing in the MCP CallToolRequestSchema handler: when name === 'update_session', it calls handleUpdateSession with the parsed args.
    if (name === "update_session") {
      return await handleUpdateSession(
        args as Parameters<typeof handleUpdateSession>[0]
      );
    }
  • src/index.ts:129-129 (registration)
    Tool listing registration: updateSessionTool is included in the tools array sent in response to ListToolsRequestSchema.
    updateSessionTool,
Behavior4/5

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

With no annotations, the description adds behavioral context: requires write permission, findings are not editable, and tags format requirement. Does not cover side effects or response behavior, but sufficient for a mutation tool.

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

Conciseness5/5

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

Concise and well-structured, each sentence adds necessary information without redundancy. No fluff.

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 purpose, parameters, permissions, and specific field constraints. Lacks info on response or errors, but for a mutation tool with good parameter descriptions, it is fairly complete.

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

Parameters4/5

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

Schema coverage is 100%, and description adds value by explaining partial update semantics, acceptable values for assigneeUserId, and required format for tags, exceeding schema details.

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?

The description clearly states the tool modifies an existing exploratory session, with a specific verb and resource. It distinguishes from siblings like create_session and other update tools.

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

Usage Guidelines4/5

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

Provides guidance to send only changed fields inside the updates object, lists allowed fields, and notes what is not editable. Could be more explicit about when to use vs. alternatives, but overall clear.

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