baconipsum-mcp 1.0.1 → 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.
package/README.md CHANGED
@@ -18,3 +18,5 @@ node dist/index.js
18
18
  ```
19
19
 
20
20
  Data comes from the public Bacon Ipsum API.
21
+
22
+
package/dist/api.js CHANGED
@@ -14,3 +14,8 @@ export async function generate(args) {
14
14
  return 'No text returned.';
15
15
  return d.join(' ');
16
16
  }
17
+ // ---- muxA tools:
18
+ // The existing tool returns one joined blob of sentences. This returns the real
19
+ // paragraph blocks the API can produce, in JSON, HTML or plain text, and refuses
20
+ // a type the API would silently ignore.
21
+ const TYPES = ['meat-and-filler', 'all-meat'];
package/dist/server.js CHANGED
@@ -17,7 +17,21 @@ export function createServer() {
17
17
  return text(await generate(args));
18
18
  }
19
19
  catch (e) {
20
- return textError(error(e));
20
+ return textError(String(e));
21
+ }
22
+ });
23
+ server.registerTool("paragraphs", {
24
+ title: "Paragraphs",
25
+ description: "Bacon Ipsum as real paragraph blocks rather than one blob, in JSON, HTML or plain text, with the optional traditional lorem opener. The type is checked here because the API answers with its default text for a type it does not know.",
26
+ inputSchema: z.object({ paras: z.number().describe("How many paragraphs, 1-10. Defaults to 3.").optional(), type: z.string().describe("meat-and-filler or all-meat. Defaults to meat-and-filler.").optional(), startWithLorem: z.boolean().describe("Start with 'Bacon ipsum dolor amet' instead of random words.").optional(), format: z.string().describe("json, html or text. Defaults to json.").optional() }),
27
+ annotations: READ_ONLY,
28
+ }, async (args) => {
29
+ // TODO: implement paragraphs locally (paywall removed)
30
+ try {
31
+ return textError("Not yet implemented: paragraphs");
32
+ }
33
+ catch (e) {
34
+ return textError(String(e));
21
35
  }
22
36
  });
23
37
  return server;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.1",
2
+ "version": "1.0.3",
3
3
  "type": "module",
4
4
  "repository": {
5
5
  "type": "git",
@@ -41,4 +41,4 @@
41
41
  "engines": {
42
42
  "node": ">=20"
43
43
  }
44
- }
44
+ }