@workover/mcp 0.4.0 → 0.5.1

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 (3) hide show
  1. package/README.md +2 -2
  2. package/lib.mjs +19 -1
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @workover/mcp
2
2
 
3
- An [MCP](https://modelcontextprotocol.io) server for [Workover](https://workover.dev) — lets Claude Code (and other MCP clients) read your Workover documents, create new ones, and propose edits you review.
3
+ An [MCP](https://modelcontextprotocol.io) server for [Workover](https://workover.io) — lets Claude Code (and other MCP clients) read your Workover documents, create new ones, and propose edits you review.
4
4
 
5
5
  ## Setup
6
6
 
@@ -42,7 +42,7 @@ Two deliberate exceptions, both of which still stop short of publishing:
42
42
 
43
43
  ## Configuration
44
44
 
45
- The API endpoint comes from your `workover login` (defaults to `https://api.workover.dev`).
45
+ The API endpoint comes from your `workover login` (defaults to `https://api.workover.io`).
46
46
 
47
47
  ## Usage data
48
48
 
package/lib.mjs CHANGED
@@ -170,7 +170,25 @@ export function makeDispatch({ auth, api, apiPost, fetchImpl = fetch, readFile }
170
170
  if (docId === null) return badIdErr('document', args.docId);
171
171
  const d = await api(`/project/doc/${docId}`);
172
172
  if (!d || !d.id) return err(`Document ${docId} not found (or no access).`);
173
- const body = d.bodyText || stripHtml(d.content) || '(empty document)';
173
+ // Prefer the LIVE body, which is the only one with images in it.
174
+ //
175
+ // `bodyText` is plain text kept for search and `content` is only written on a WordPress
176
+ // import, so a document written in the editor read as empty here, and one made of
177
+ // screenshots read as empty EXACTLY — plain text of an image is nothing. An agent that
178
+ // reads "(empty document)" and then edits is working from a blank page that is not blank.
179
+ //
180
+ // Best-effort: an api that predates this route still answers the row.
181
+ let live = null;
182
+ try {
183
+ live = await api(`/project/doc/${docId}/content`);
184
+ } catch {
185
+ live = null;
186
+ }
187
+ const body =
188
+ live?.markdown?.trim() ||
189
+ d.bodyText ||
190
+ stripHtml(d.content) ||
191
+ '(empty document)';
174
192
  return text(`# ${d.title || 'Untitled'} (id ${d.id})\n\n${body}`);
175
193
  }
176
194
  if (name === 'workover_list_projects') {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@workover/mcp",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "Workover MCP server — let Claude Code and other MCP clients read and cowork on your Workover documents.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ScaleMath",
7
- "homepage": "https://workover.dev",
7
+ "homepage": "https://workover.io",
8
8
  "bugs": {
9
- "url": "https://workover.dev"
9
+ "url": "https://workover.io"
10
10
  },
11
11
  "keywords": [
12
12
  "workover",