oxylabs-ai-studio-mcp 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/server.js +24 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxylabs-ai-studio-mcp",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "scripts": {
5
5
  "lint": "eslint ."
6
6
  },
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "fastmcp": "^3.3.1",
31
- "oxylabs-ai-studio": "^1.0.12",
31
+ "oxylabs-ai-studio": "^1.0.15",
32
32
  "zod": "^3.25.67"
33
33
  },
34
34
  "files": [
package/server.js CHANGED
@@ -81,8 +81,8 @@ Parameters:
81
81
  url: args.url,
82
82
  output_format: args.output_format,
83
83
  user_prompt: args.user_prompt,
84
- openapi_schema: args.schema,
85
- render_html: args.render_javascript };
84
+ schema: args.schema,
85
+ render_javascript: args.render_javascript };
86
86
  if (args.output_format === 'json' && !args.schema) {
87
87
  const response = await sdk.aiScraper.scrapeWithAutoSchema(payload);
88
88
  return JSON.stringify({ content: response.data });
@@ -106,7 +106,8 @@ Schema is required only if output_format is json.
106
106
 
107
107
  Parameters:
108
108
  - url: The URL from which crawling will be started.
109
- - crawl_prompt: What information user wants to extract from the domain.
109
+ - user_prompt: What information user wants to extract from the domain.
110
+ - parse_prompt: What information user wants to extract from the page.
110
111
  - output_format: The format of the output. Json or Markdown. If json, the schema is required. Markdown returns full text of the page.
111
112
  - schema: The schema to use for the crawl. Only required if 'output_format' is json. In openapi format.
112
113
  - render_javascript: Whether to render the HTML of the page using javascript. Much slower, therefore use it only for websites that require javascript to render the page. Unless user asks to use it, first try to crawl the page without it. If results are unsatisfactory, try to use it.
@@ -114,7 +115,8 @@ Parameters:
114
115
  `,
115
116
  parameters: z.object({
116
117
  url: z.string().url(),
117
- crawl_prompt: z.string(),
118
+ user_prompt: z.string(),
119
+ parse_prompt: z.string(),
118
120
  output_format: z.enum(["json", "markdown"]),
119
121
  schema: z.record(z.any()).optional().nullable().default(null),
120
122
  render_javascript: z.boolean().default(false).optional(),
@@ -125,21 +127,22 @@ Parameters:
125
127
  if (args.output_format === 'json' && !args.schema) {
126
128
  const payload = {
127
129
  url: args.url,
128
- crawl_prompt: args.crawl_prompt,
130
+ user_prompt: args.user_prompt,
131
+ parse_prompt: args.parse_prompt,
129
132
  output_format: args.output_format,
130
- render_html: args.render_javascript,
131
- max_pages: args.return_sources_limit,
133
+ render_javascript: args.render_javascript,
134
+ return_sources_limit: args.return_sources_limit,
132
135
  }
133
136
  const response = await sdk.aiCrawler.crawlWithAutoSchema(payload);
134
137
  return JSON.stringify({ content: response.data });
135
138
  }
136
139
  const payload = {
137
140
  url: args.url,
138
- crawl_prompt: args.crawl_prompt,
141
+ user_prompt: args.user_prompt,
139
142
  output_format: args.output_format,
140
- openapi_schema: args.schema,
141
- render_html: args.render_javascript,
142
- max_pages: args.return_sources_limit };
143
+ schema: args.schema,
144
+ render_javascript: args.render_javascript,
145
+ return_sources_limit: args.return_sources_limit };
143
146
  const response = await sdk.aiCrawler.crawl(payload);
144
147
  return JSON.stringify({ content: response.data });
145
148
  } catch (error) {
@@ -156,17 +159,19 @@ Run the browser agent and return the data in the specified format.
156
159
  This tool is useful if you need navigate around the website and do some actions.
157
160
  It allows navigating to any url, clicking on links, filling forms, scrolling, etc.
158
161
  Finally it returns the data in the specified format. Schema is required only if output_format is json.
159
- 'browse_prompt' describes what browser agent should achieve.
162
+ 'user_prompt' describes what browser agent should achieve.
160
163
 
161
164
  Parameters:
162
165
  - url: The URL to start the browser agent navigation from.
163
- - browse_prompt: What browser agent should do.
166
+ - user_prompt: What browser agent should do.
167
+ - parse_prompt: What information user wants to extract from the page.
164
168
  - output_format: The output format. Screenshot is base64 encoded jpeg image. Markdown returns full text of the page including links. If json, the schema is required.
165
169
  - schema: The schema in openapi format to use for the browser agent. Only required if 'output_format' is json.
166
170
  `,
167
171
  parameters: z.object({
168
172
  url: z.string().url(),
169
- browse_prompt: z.string(),
173
+ user_prompt: z.string(),
174
+ parse_prompt: z.string(),
170
175
  output_format: z.enum(["json", "markdown", "html", "screenshot"]),
171
176
  schema: z.record(z.any()).optional().nullable(),
172
177
  }),
@@ -174,19 +179,18 @@ Parameters:
174
179
  try {
175
180
  if (args.output_format === 'json' && !args.schema) {
176
181
  const payload = {
177
- url: args.url,
178
- browse_prompt: args.browse_prompt,
182
+ url: args.url,
179
183
  output_format: args.output_format,
180
- parse_prompt: args.browse_prompt,
181
- openapi_schema: args.schema };
184
+ parse_prompt: args.parse_prompt,
185
+ };
182
186
  const response = await sdk.browserAgent.browseWithAutoSchema(payload, 240000);
183
187
  return JSON.stringify({ content: response.data });
184
188
  }
185
189
  const payload = {
186
190
  url: args.url,
187
- browse_prompt: args.browse_prompt,
191
+ user_prompt: args.user_prompt,
188
192
  output_format: args.output_format,
189
- openapi_schema: args.schema };
193
+ schema: args.schema };
190
194
  const response = await sdk.browserAgent.browse(payload, 240000);
191
195
  return JSON.stringify({ content: response.data });
192
196
  } catch (error) {