Files
sim/apps/docs/content/docs/en/tools/google_pagespeed.mdx
Waleed cef321bda2 feat(box): add Box and Box Sign integrations (#3660)
* feat(box): add Box and Box Sign integrations

Add complete Box integration with file management (upload, download, get info, list folders, create/delete folders, copy, search, update metadata) and Box Sign e-signature support (create/get/list/cancel/resend sign requests). Includes OAuth provider setup, internal upload API route following the Dropbox pattern, block configurations, icon, and generated docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(box): address PR review comments

- Fix docsLink for Box Sign: use underscore (box_sign) to match docs URL
- Move normalizeFileInput from tool() to params() in Box block config to match Dropbox pattern
- Throw error on invalid additionalSigners JSON instead of silently dropping signers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(box): remove unsupported reason param from cancel sign request

The Box Sign cancel endpoint (POST /sign_requests/{id}/cancel) does not
accept a request body per the API specification. Remove the misleading
reason parameter from the tool, types, block config, and docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(box): use canonical param ID for file normalization in params()

The params function must reference canonical IDs (params.file), not raw
subBlock IDs (uploadFile/fileRef) which are deleted after canonical
transformation. Matches the Dropbox block pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(box): use generic output descriptions for shared file properties

Rename "Uploaded file ID/name" to "File ID/name" in
UPLOAD_FILE_OUTPUT_PROPERTIES since the constant is shared by both
upload and copy operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(box): rename items output to entries for list_folder_items

Rename the output field from "items" to "entries" to match Box API
naming and avoid collision with JSON schema "items" keyword that
prevented the docs generator from rendering the nested array structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(box): filter empty file IDs from sourceFileIds input

Add .filter(Boolean) after splitting sourceFileIds to prevent empty
strings from trailing/double commas being sent as invalid file IDs
to the Box Sign API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(box): merge Box Sign into single Box block

Combine Box and Box Sign into one unified block with all 15 operations
accessible via a single dropdown, removing the separate box_sign block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(box): filter empty strings from tags array in update_file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(docs): apply lint formatting to icon-mapping and meta.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(box): format chained method calls per linter rules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(box,docusign): set block bgColor to white and regenerate docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(docs): apply lint formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(box): populate OAuth scopes for Box since token response omits them

Box's OAuth2 token endpoint does not return a scope field in the
response, so Better Auth stores nothing in the DB. This causes the
credential selector to always show "Additional permissions required".
Fix by populating the scope from the requested scopes in the
account.create.before hook.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(box): add sign_requests.readwrite scope for Box Sign operations

Box Sign API requires the sign_requests.readwrite scope in addition
to root_readwrite. Without it, sign requests fail with "The request
requires higher privileges than provided by the access token."

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update docs

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:06:08 -07:00

87 lines
4.3 KiB
Plaintext

---
title: Google PageSpeed
description: Analyze webpage performance with Google PageSpeed Insights
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="google_pagespeed"
color="#E0E0E0"
/>
{/* MANUAL-CONTENT-START:intro */}
[Google PageSpeed Insights](https://pagespeed.web.dev/) is a web performance analysis tool powered by Lighthouse that evaluates the quality of web pages across multiple dimensions including performance, accessibility, SEO, and best practices.
With the Google PageSpeed integration in Sim, you can:
- **Analyze webpage performance**: Get detailed performance scores and metrics for any public URL, including First Contentful Paint, Largest Contentful Paint, and Speed Index
- **Evaluate accessibility**: Check how well a webpage meets accessibility standards and identify areas for improvement
- **Audit SEO**: Assess a page's search engine optimization and discover opportunities to improve rankings
- **Review best practices**: Verify that a webpage follows modern web development best practices
- **Compare strategies**: Run analyses using either desktop or mobile strategies to understand performance across device types
- **Localize results**: Retrieve analysis results in different locales for internationalized reporting
In Sim, the Google PageSpeed integration enables your agents to programmatically audit web pages as part of automated workflows. This is useful for monitoring site performance over time, triggering alerts when scores drop below thresholds, generating performance reports, and ensuring that deployed changes meet quality standards before release.
### Getting Your API Key
1. Go to the [Google Cloud Console](https://console.cloud.google.com/)
2. Create or select a project
3. Enable the **PageSpeed Insights API** from the API Library
4. Navigate to **Credentials** and create an API key
5. Use the API key in the Sim block configuration
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Analyze web pages for performance, accessibility, SEO, and best practices using Google PageSpeed Insights API powered by Lighthouse.
## Tools
### `google_pagespeed_analyze`
Analyze a webpage for performance, accessibility, SEO, and best practices using Google PageSpeed Insights.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Google PageSpeed Insights API Key |
| `url` | string | Yes | The URL of the webpage to analyze |
| `category` | string | No | Lighthouse categories to analyze \(comma-separated\): performance, accessibility, best-practices, seo |
| `strategy` | string | No | Analysis strategy: desktop or mobile |
| `locale` | string | No | Locale for results \(e.g., en, fr, de\) |
| `pricing` | per_request | No | No description |
| `rateLimit` | string | No | No description |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `finalUrl` | string | The final URL after redirects |
| `performanceScore` | number | Performance category score \(0-1\) |
| `accessibilityScore` | number | Accessibility category score \(0-1\) |
| `bestPracticesScore` | number | Best Practices category score \(0-1\) |
| `seoScore` | number | SEO category score \(0-1\) |
| `firstContentfulPaint` | string | Time to First Contentful Paint \(display value\) |
| `firstContentfulPaintMs` | number | Time to First Contentful Paint in milliseconds |
| `largestContentfulPaint` | string | Time to Largest Contentful Paint \(display value\) |
| `largestContentfulPaintMs` | number | Time to Largest Contentful Paint in milliseconds |
| `totalBlockingTime` | string | Total Blocking Time \(display value\) |
| `totalBlockingTimeMs` | number | Total Blocking Time in milliseconds |
| `cumulativeLayoutShift` | string | Cumulative Layout Shift \(display value\) |
| `cumulativeLayoutShiftValue` | number | Cumulative Layout Shift numeric value |
| `speedIndex` | string | Speed Index \(display value\) |
| `speedIndexMs` | number | Speed Index in milliseconds |
| `interactive` | string | Time to Interactive \(display value\) |
| `interactiveMs` | number | Time to Interactive in milliseconds |
| `overallCategory` | string | Overall loading experience category \(FAST, AVERAGE, SLOW, or NONE\) |
| `analysisTimestamp` | string | UTC timestamp of the analysis |
| `lighthouseVersion` | string | Version of Lighthouse used for the analysis |