Skip to main content
Glama

Add Script to Framework

add_script_to_framework

Add an existing automation script to the project's test framework. Fetches the script by ID, ensures the framework exists (creating it if needed), and writes the test file into the framework directory.

Input Schema

NameRequiredDescriptionDefault
contextNoExplain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): "Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization."
frameworkNoFramework type. Known values: playwright (default), pytest, rust_cargo, go_test. Unknown values fall back to playwright via FrameworkManager.resolve_framework_type, so existing MCP clients passing arbitrary strings (the historical contract) are not rejected — this field is intentionally not strictly enum-enforced.playwright
script_idYesAutomation script ID to add to the framework

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations (readOnly=false, destructive=false), the description discloses the key hidden side effect: the framework is created if it does not exist, and a test file is written to disk. It does not say what happens if the script is already in the framework (overwrite vs. duplicate) or what the call returns.

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?

Two sentences, front-loaded with the action and immediately followed by the three-step mechanics. No filler and nothing repeated from the schema.

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?

Annotations cover the safety profile and no output schema exists, so the description only needs to explain the mutation. It covers creation and file writing but leaves idempotency/overwrite semantics and failure conditions unstated for a write tool.

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

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. The description adds light mapping ("fetches the script by ID" → script_id, "ensures the framework exists" → framework) but nothing on the framework fallback behavior or the required `context` analytics parameter beyond what the schema already documents.

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

Purpose4/5

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

Specific verb plus resource ("Add an existing automation script to the project's test framework") with the mechanism spelled out: fetch by ID, ensure framework, write file. It is distinct from generate_tests or update_script, though it never names a sibling to contrast against.

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?

Usage is implied by "existing automation script" — the script must already exist, so this is not for generating code. There is no explicit when-not guidance and no pointer to alternatives such as generate_code_for_test_case or export_framework for the reverse direction.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources