Skip to content

[docs] docs(mcp-scripts): remove redundant content (21% reduction)#21140

Merged
pelikhan merged 1 commit intomainfrom
docs/unbloat-mcp-scripts-bf4986c6bac20731
Mar 16, 2026
Merged

[docs] docs(mcp-scripts): remove redundant content (21% reduction)#21140
pelikhan merged 1 commit intomainfrom
docs/unbloat-mcp-scripts-bf4986c6bac20731

Conversation

@github-actions
Copy link
Contributor

Removes 80 lines (21%) of bloat from docs/src/content/docs/reference/mcp-scripts.md while preserving all essential technical information.

File improved

docs/src/content/docs/reference/mcp-scripts.md (375 → 295 lines)

What was removed

Bloat type Lines removed Reason
Tool definition subsections (Required/Optional/Implementation) ~18 Restated what the code block already showed with inline comments
First JavaScript example (calculate-sum) ~16 Quick Start already demonstrates a JS tool; only needed the secrets example
Supported Types + Validation Options subsections ~14 Duplicated the example-tool code block above them
Go "Available by default" list + second api-call example ~29 Import list mentioned inline in the section description; env var pattern condensed to a single note
Duplicate CAUTION in Security Considerations ~3 Identical to the opening CAUTION callout

Changes preserved

All essential information is retained:

  • The opening CAUTION about READ-ONLY operations (unchanged)
  • The description: + one-of-script:/run:/py:/go: requirement (condensed to one line)
  • All four language sections with working code examples
  • The Go section still shows inputs map[string]any usage and a cross-reference for os.Getenv()
  • Input parameter options (type, required, default, enum, description) visible in the code block
  • Timeout, env vars, large output handling, comparison table, troubleshooting, and related docs all intact

Screenshot

MCP Scripts reference page after cleanup

Blocked Domains: During screenshot capture, the following external resource domains were blocked by network policy: fonts.googleapis.com (fonts), fonts.gstatic.com (fonts). The page renders correctly with locally bundled fonts (MonaSans) as fallback.

References:

🗜️ Compressed by Documentation Unbloat ·

Warning

⚠️ Firewall blocked 5 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • redirector.gvt1.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "redirector.gvt1.com"
    - "www.google.com"

See Network Configuration for more information.

  • expires on Mar 18, 2026, 12:16 AM UTC

Remove ~80 lines of bloat (21%) while preserving all essential information:
- Collapse tool definition subsections that duplicated the code block comments
- Remove redundant first JavaScript example (Quick Start already demonstrates JS)
- Remove Supported Types and Validation Options lists that mirrored the code block
- Replace Go "Available by default" list + second example with a brief inline note
- Remove duplicate CAUTION in Security Considerations (identical to opening CAUTION)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added automation documentation Improvements or additions to documentation labels Mar 16, 2026
@pelikhan pelikhan marked this pull request as ready for review March 16, 2026 01:43
Copilot AI review requested due to automatic review settings March 16, 2026 01:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reduces redundancy in the MCP Scripts reference doc by removing repeated explanations while keeping the core configuration and examples.

Changes:

  • Condensed the tool definition requirements into a single sentence.
  • Removed an extra JavaScript example and duplicated input-parameter explanations.
  • Simplified the Go section by removing repeated environment-variable and import details.
Comments suppressed due to low confidence (1)

docs/src/content/docs/reference/mcp-scripts.md:167

  • After removing the “Supported Types” / “Validation Options” subsections, this page no longer states which input type values are allowed (e.g., boolean, array, object) or summarizes the available validation keys. The example only shows string/number, so a reader can’t tell what else is supported without jumping to the specification; consider adding a short, non-redundant list here or linking directly to the relevant section in mcp-scripts-specification.md.
## Input Parameters

Define typed parameters with validation:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 56 to +59
timeout: 120 # Optional: timeout in seconds (default: 60)
```

### Required Fields

- **`description:`** - Human-readable description of what the tool does. This is shown to the agent for tool selection.

### Optional Fields

- **`timeout:`** - Maximum execution time in seconds (default: 60). The tool will be terminated if it exceeds this duration. Applies to shell (`run:`) and Python (`py:`) tools.

### Implementation Options

Choose one implementation method:

- **`script:`** - JavaScript (CommonJS) code
- **`run:`** - Shell script
- **`py:`** - Python script (Python 3.1x)
- **`go:`** - Go (Golang) code

You can only use one of `script:`, `run:`, `py:`, or `go:` per tool.
Each tool requires `description:` and exactly one of `script:`, `run:`, `py:`, or `go:`.
@pelikhan pelikhan merged commit 465a386 into main Mar 16, 2026
4 checks passed
@pelikhan pelikhan deleted the docs/unbloat-mcp-scripts-bf4986c6bac20731 branch March 16, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants