Skip to content

Commit ba54e3b

Browse files
committed
fix(integrations): address Semrush review findings
- Only the API key stays user-only; report selectors (target scope, limit, offset, date, sort, filter) are user-or-llm so an agent can set them - Hold the row limit at one row: a positive fraction floored to zero and sent display_limit=0 - Locate Domain vs. Domain metric columns by their own headers, so a dropped position column shortens the compared-domain run instead of shifting competition, search volume, and CPC onto the wrong values - Describe competitor and domain-list metrics as belonging to the row's domain, not to the target - Describe paid and URL traffic cost as an estimated cost, matching the Traffic Cost header those reports return, not the organic Traffic Cost (%) - Drop the newest-first claim from history outputs, which order by display_sort - Replace the erased any casts in the request tests with a typed helper
1 parent eba2cce commit ba54e3b

47 files changed

Lines changed: 357 additions & 250 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/content/docs/en/integrations/semrush.mdx

Lines changed: 38 additions & 38 deletions
Large diffs are not rendered by default.

apps/sim/tools/generated/tool-metadata.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/generated/tool-outputs.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/semrush/backlinks.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,31 +47,31 @@ export const semrushBacklinksTool: ToolConfig<SemrushBacklinksParams, SemrushBac
4747
targetType: {
4848
type: 'string',
4949
required: false,
50-
visibility: 'user-only',
51-
description: 'Scope of the target: root_domain, domain, or url',
50+
visibility: 'user-or-llm',
51+
description: 'Scope of the target: root_domain, domain, or url. Defaults to root_domain',
5252
},
5353
limit: {
5454
type: 'number',
5555
required: false,
56-
visibility: 'user-only',
56+
visibility: 'user-or-llm',
5757
description: 'Maximum number of rows to return, capped at 100,000',
5858
},
5959
offset: {
6060
type: 'number',
6161
required: false,
62-
visibility: 'user-only',
62+
visibility: 'user-or-llm',
6363
description: 'Number of rows to skip, for pagination',
6464
},
6565
displaySort: {
6666
type: 'string',
6767
required: false,
68-
visibility: 'user-only',
68+
visibility: 'user-or-llm',
6969
description: 'Sort order, for example page_ascore_desc or last_seen_desc',
7070
},
7171
displayFilter: {
7272
type: 'string',
7373
required: false,
74-
visibility: 'user-only',
74+
visibility: 'user-or-llm',
7575
description: 'Semrush display_filter expression, for example +|type||newlink',
7676
},
7777
},

apps/sim/tools/semrush/backlinks_anchors.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,25 @@ export const semrushBacklinksAnchorsTool: ToolConfig<
3939
targetType: {
4040
type: 'string',
4141
required: false,
42-
visibility: 'user-only',
43-
description: 'Scope of the target: root_domain, domain, or url',
42+
visibility: 'user-or-llm',
43+
description: 'Scope of the target: root_domain, domain, or url. Defaults to root_domain',
4444
},
4545
limit: {
4646
type: 'number',
4747
required: false,
48-
visibility: 'user-only',
48+
visibility: 'user-or-llm',
4949
description: 'Maximum number of rows to return, capped at 100,000',
5050
},
5151
offset: {
5252
type: 'number',
5353
required: false,
54-
visibility: 'user-only',
54+
visibility: 'user-or-llm',
5555
description: 'Number of rows to skip, for pagination',
5656
},
5757
displaySort: {
5858
type: 'string',
5959
required: false,
60-
visibility: 'user-only',
60+
visibility: 'user-or-llm',
6161
description: 'Sort order, for example backlinks_num_desc or domains_num_desc',
6262
},
6363
},

apps/sim/tools/semrush/backlinks_competitors.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ export const semrushBacklinksCompetitorsTool: ToolConfig<
4646
targetType: {
4747
type: 'string',
4848
required: false,
49-
visibility: 'user-only',
50-
description: 'Scope of the target: root_domain, domain, or url',
49+
visibility: 'user-or-llm',
50+
description: 'Scope of the target: root_domain, domain, or url. Defaults to root_domain',
5151
},
5252
limit: {
5353
type: 'number',
5454
required: false,
55-
visibility: 'user-only',
55+
visibility: 'user-or-llm',
5656
description: 'Maximum number of rows to return, capped at 100,000',
5757
},
5858
offset: {
5959
type: 'number',
6060
required: false,
61-
visibility: 'user-only',
61+
visibility: 'user-or-llm',
6262
description: 'Number of rows to skip, for pagination',
6363
},
6464
},

apps/sim/tools/semrush/backlinks_geo_distribution.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,25 @@ export const semrushBacklinksGeoDistributionTool: ToolConfig<
3838
targetType: {
3939
type: 'string',
4040
required: false,
41-
visibility: 'user-only',
42-
description: 'Scope of the target: root_domain, domain, or url',
41+
visibility: 'user-or-llm',
42+
description: 'Scope of the target: root_domain, domain, or url. Defaults to root_domain',
4343
},
4444
limit: {
4545
type: 'number',
4646
required: false,
47-
visibility: 'user-only',
47+
visibility: 'user-or-llm',
4848
description: 'Maximum number of rows to return, capped at 100,000',
4949
},
5050
offset: {
5151
type: 'number',
5252
required: false,
53-
visibility: 'user-only',
53+
visibility: 'user-or-llm',
5454
description: 'Number of rows to skip, for pagination',
5555
},
5656
displaySort: {
5757
type: 'string',
5858
required: false,
59-
visibility: 'user-only',
59+
visibility: 'user-or-llm',
6060
description: 'Sort order, for example domains_num_desc or backlinks_num_desc',
6161
},
6262
},

apps/sim/tools/semrush/backlinks_indexed_pages.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,25 @@ export const semrushBacklinksIndexedPagesTool: ToolConfig<
4848
targetType: {
4949
type: 'string',
5050
required: false,
51-
visibility: 'user-only',
52-
description: 'Scope of the target: root_domain, domain, or url',
51+
visibility: 'user-or-llm',
52+
description: 'Scope of the target: root_domain, domain, or url. Defaults to root_domain',
5353
},
5454
limit: {
5555
type: 'number',
5656
required: false,
57-
visibility: 'user-only',
57+
visibility: 'user-or-llm',
5858
description: 'Maximum number of rows to return, capped at 100,000',
5959
},
6060
offset: {
6161
type: 'number',
6262
required: false,
63-
visibility: 'user-only',
63+
visibility: 'user-or-llm',
6464
description: 'Number of rows to skip, for pagination',
6565
},
6666
displaySort: {
6767
type: 'string',
6868
required: false,
69-
visibility: 'user-only',
69+
visibility: 'user-or-llm',
7070
description: 'Sort order, for example domains_num_desc or backlinks_num_desc',
7171
},
7272
},

apps/sim/tools/semrush/backlinks_overview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export const semrushBacklinksOverviewTool: ToolConfig<
4949
targetType: {
5050
type: 'string',
5151
required: false,
52-
visibility: 'user-only',
53-
description: 'Scope of the target: root_domain, domain, or url',
52+
visibility: 'user-or-llm',
53+
description: 'Scope of the target: root_domain, domain, or url. Defaults to root_domain',
5454
},
5555
},
5656

apps/sim/tools/semrush/backlinks_tld_distribution.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,25 @@ export const semrushBacklinksTldDistributionTool: ToolConfig<
3939
targetType: {
4040
type: 'string',
4141
required: false,
42-
visibility: 'user-only',
43-
description: 'Scope of the target: root_domain, domain, or url',
42+
visibility: 'user-or-llm',
43+
description: 'Scope of the target: root_domain, domain, or url. Defaults to root_domain',
4444
},
4545
limit: {
4646
type: 'number',
4747
required: false,
48-
visibility: 'user-only',
48+
visibility: 'user-or-llm',
4949
description: 'Maximum number of rows to return, capped at 100,000',
5050
},
5151
offset: {
5252
type: 'number',
5353
required: false,
54-
visibility: 'user-only',
54+
visibility: 'user-or-llm',
5555
description: 'Number of rows to skip, for pagination',
5656
},
5757
displaySort: {
5858
type: 'string',
5959
required: false,
60-
visibility: 'user-only',
60+
visibility: 'user-or-llm',
6161
description: 'Sort order, for example domains_num_desc or backlinks_num_desc',
6262
},
6363
},

0 commit comments

Comments
 (0)