resume
Crawl a web resource and prepare a resume of what it is about and what it offers.
How to call
In supported clients the command syntax can vary. If the WDS MCP server is registered as wds, use:
| Client | Command |
|---|---|
| Visual Studio Code | /mcp.wds.resume |
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| url | string | No | http://playground |
A website URL |
Returned Prompt Text
The block below contains the complete prompt returned to the MCP client. Runtime placeholders map to arguments as follows:
<url>—url
ROLE:
Act as a web developer with experience in designing multi-page web resources, including paged data, templating, and expertise in pure CSS as well as in modern CSS frameworks: Bootstrap, Tailwind CSS, Foundation, Bulma, UIkit, Tachyons, Materialize, Metro, Spectre.css, Milligram, Pure.css, Skeleton, NES.css, W3.CSS, Picnic CSS, Basscss, Shoelace, etc.
Your experience includes working with web resources that have complex structures, such as those with paged data, hierarchical menus, and leaf pages with data accessible from various navigation elements. You are skilled in identifying and extracting data fields from web pages using CSS selectors and XPath expressions.
OBJECTIVE:
Crawl through all pages of TARGET_URL website using WDS MCP tools, gather its content, and prepare a resume of what the website is about and what it offers.
RESTRICTIONS:
- The agent must use the exact values returned by MCP tools as inputs for later steps. Do not rewrite or guess job names, URLs, run numbers, cursors, or selectors.
- MCP structured tool results are serialized as lower-camel JSON fields. Use returned field names such as runNum, completeDateUtc, failedDownloadTasks, data, and dataCursor when reading tool results.
- The agent must perform all steps of the PROCEDURE in order, without skipping or parallel execution.
- Call MCP tools with named arguments matching the tool parameter names.
- WdsFetchChunked returns the download task ID as a string. It does not return raw page text.
- Use WdsGetChunk(taskId=taskId, startIndex=startIndex, length=length) to read task content in chunks. Do not use shell/file tools to recover hidden or truncated content from MCP output.
- Resolve relative links against the current page URL before passing them to WdsFetchChunked.
- To change a JobConfig, read the current object with WdsGetJobConfig when it exists, create or modify the complete object in memory, then persist it with WdsUpsertJobConfig(jobName=jobName, jobConfig=jobCfg). Preserve all unrelated existing properties.
- When setting nested JobConfig properties, create missing nested objects or arrays before setting their fields.
- To change a TraversalConfig, create or modify the complete object in memory, then persist it with WdsUpsertTraversalConfig(jobName=jobName, traversalConfig=traversalConfig).
- WdsRunTraversal and WdsTraversalAll return TraversalRunResult, not crawl data. Use runNum with WdsGetTraversalRunInfo, WdsGetTraversalRunErrors, and WdsGetTraversalRunData.
- On any MCP tool error, the agent must STOP WITH REASON and surface the error response.
- Do not stop reading gathered data while dataCursor is not null.
GLOBAL CONSTANTS:
TARGET_URL = '<url>'
PROCEDURE (EXECUTE IN EXACT ORDER)
1. Identify host
- Extract authority/host from TARGET_URL -> lowercase, normalized -> tgtHost
2. Get or create job
- jobs = WdsGetJobs()
- Find job where job.jobName equals tgtHost (case-insensitive)
- If not found:
- jobName = tgtHost
- Do not call WdsGetJobConfig before creating the job; a missing job is expected on this path.
- Determine jobType:
- 'Intranet' if host is single-label or ends with .local, .internal, .svc.cluster.local, or lacks a TLD
- Otherwise 'Internet'
- Create jobCfg as a complete JobConfig:
- startUrls = [TARGET_URL]
- type = jobType
- restart.jobRestartMode = 'Continue'
- Persist jobCfg with WdsUpsertJobConfig(jobName=jobName, jobConfig=jobCfg)
- jobCfg = WdsGetJobConfig(jobName=jobName)
- If found:
- jobName = job.jobName
- jobCfg = WdsGetJobConfig(jobName=jobName)
3. Configure job
- Update jobCfg in memory, preserving all unrelated properties:
- jobCfg.restart.jobRestartMode = 'Continue'
- Persist jobCfg with WdsUpsertJobConfig(jobName=jobName, jobConfig=jobCfg)
- jobCfg = WdsGetJobConfig(jobName=jobName)
4. Start crawling
- convert = 'md()';
- maxDepth = null
- traversalRunResult = WdsTraversalAll(jobName=jobName, convert=convert, maxDepth=maxDepth)
- runNum = traversalRunResult.runNum
- Do not infer runNum from job state, run lists, previous output, or arithmetic.
5. Validate crawl completion
- Wait for the traversal run to complete:
- maxPolls = 60
- pollIntervalSec = 1
- pollCount = 0
- lastTraversalRunInfo = null
- REPEAT while pollCount < maxPolls:
- pollCount = pollCount + 1
- traversalRunInfo = WdsGetTraversalRunInfo(jobName=jobName, runNum=runNum)
- lastTraversalRunInfo = traversalRunInfo
- If traversalRunInfo.completeDateUtc is not null:
- BREAK
- Wait pollIntervalSec seconds before the next poll.
- Continue polling with WdsGetTraversalRunInfo(jobName=jobName, runNum=runNum) until traversalRunInfo.completeDateUtc is not null or pollCount reaches maxPolls.
- If lastTraversalRunInfo.completeDateUtc is null:
- STOP WITH REASON because traversal run did not report completion after maxPolls polls; include runNum and lastTraversalRunInfo in the reason.
- traversalRunErrors = WdsGetTraversalRunErrors(jobName=jobName, runNum=runNum)
- If traversalRunErrors.failedDownloadTasks is NOT empty:
- For each downloadTask in traversalRunErrors.failedDownloadTasks:
- For each failedDownloadTask in downloadTask.failedDownloadTasks:
- status = WdsGetDownloadTaskStatus(taskId=failedDownloadTask.id)
- If status.result is null:
- Collect status.url, null, null
- If status.result is not null:
- Collect status.url, status.result.httpStatusCode, status.result.reasonPhrase
- Output a table: | URL | HttpStatusCode | ReasonPhrase |
- Proceed with successfully gathered data
6. Get all gathered data
- cursor = null
- traversalAllData = []
- REPEAT:
- traversalData = WdsGetTraversalRunData(jobName=jobName, runNum=runNum, path=null, cursor=cursor, limit=100)
- Append every item in traversalData.data to traversalAllData without dropping or overwriting previously fetched items
- cursor = traversalData.dataCursor
- UNTIL cursor is null
7. Analyze and answer
- Analyze all retrieved and fetched data in traversalAllData.
- Build a resume of the website with the following structure:
- Main Topic: a brief description of the main topic of the website;
- Contact Information: a list of contact information available on the website, including phone numbers, email addresses, and social media links;
- Target Audience: a brief description of the target audience of the website, including their interests and needs.
- Services: a list of services found on the website (if they are), with a full description of each service.
- Products: a list of products found on the website (if they are), with a full description of each product;
- FAQ: a list of frequently asked questions found on the website, with answers to each question;