Skip to main content
Glama

get_workspace_context

Retrieve a summary of the current Selenix workspace, including project name, active test, test count, and selected command count for browser automation management.

Instructions

Get a summary of the current Selenix workspace: project name, active test, test count, selected command count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool execution is dynamic; the BridgeClient makes an HTTP POST request to an API endpoint named after the tool (in this case, /api/get_workspace_context).
    export class BridgeClient {
      async call(endpoint: string, body: Record<string, unknown> = {}): Promise<unknown> {
        // Re-read config on every call so we pick up new tokens after Selenix restarts
        const config = readConfig()
    
        return new Promise((resolve, reject) => {
          const data = JSON.stringify(body)
          const req = http.request(
            {
              hostname: '127.0.0.1',
              port: config.port,
              path: `/api/${endpoint}`,
              method: 'POST',
              headers: {
                'Content-Type': 'application/json',
                Authorization: `Bearer ${config.token}`,
                'Content-Length': Buffer.byteLength(data),
              },
              timeout: 180000, // 3 minutes for long-running operations like run_test
            },
            (res) => {
              let responseData = ''
              res.on('data', (chunk: string) => (responseData += chunk))
              res.on('end', () => {
                try {
                  resolve(JSON.parse(responseData))
                } catch {
                  resolve({ raw: responseData })
                }
              })
            }
          )
          req.on('error', (err) =>
            reject(
              new Error(
                `Cannot connect to Selenix bridge at 127.0.0.1:${config.port}. ` +
                  `Is Selenix running with MCP Server enabled? (${err.message})`
              )
            )
          )
          req.on('timeout', () => {
            req.destroy()
            reject(new Error('Request timed out after 180 seconds'))
          })
          req.write(data)
          req.end()
        })
      }
  • src/tools.ts:162-166 (registration)
    Registration of the 'get_workspace_context' tool definition.
      name: 'get_workspace_context',
      description:
        'Get a summary of the current Selenix workspace: project name, active test, test count, selected command count.',
      inputSchema: { type: 'object' as const, properties: {} },
    },
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the tool's read-only nature through 'Get' and specifies the exact data returned, but doesn't mention error conditions, performance characteristics, or whether this requires specific permissions. The behavioral disclosure is adequate but minimal.

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?

Single sentence efficiently conveys purpose and return values with zero waste. Every word earns its place - 'Get' establishes action, 'summary of current Selenix workspace' defines scope, and the list specifies exact data points.

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?

For a zero-parameter tool with no output schema, the description provides complete context about what information is returned. It could be more complete by mentioning format or structure of the summary, but given the tool's simplicity and lack of annotations, it adequately covers the essential behavior.

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?

The tool has zero parameters (schema coverage 100%), so the description appropriately focuses on what the tool returns rather than inputs. It provides clear semantics about the workspace context being retrieved, establishing the baseline expectation for a parameterless tool.

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 specific action ('Get a summary') and resource ('current Selenix workspace'), listing the exact information returned (project name, active test, test count, selected command count). It distinguishes from siblings like get_project_info or get_active_test by specifying this is a comprehensive workspace summary rather than individual components.

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

Usage Guidelines3/5

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

The description implies usage when needing workspace context, but provides no explicit guidance on when to use this versus alternatives like get_project_info or get_active_test. It doesn't mention prerequisites, exclusions, or comparative scenarios with sibling tools.

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/markmircea/Selenix-MCP-Server'

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