@stratta/mcp 0.2.0 → 0.3.0

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/dist/index.js CHANGED
@@ -25,7 +25,7 @@ const tools = [
25
25
  getCrossRefsTool,
26
26
  ...ingestTools,
27
27
  ];
28
- const server = new Server({ name: 'stratta-mcp', version: '0.2.0' }, { capabilities: { tools: {} } });
28
+ const server = new Server({ name: 'stratta-mcp', version: '0.3.0' }, { capabilities: { tools: {} } });
29
29
  const client = createConvexClient();
30
30
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
31
31
  tools,
@@ -104,6 +104,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
104
104
  'image' in result) {
105
105
  const r = result;
106
106
  recordUsage();
107
+ const lines = [`${r.figureNumber} — ${r.caption}`];
108
+ if (r.url) {
109
+ lines.push(`Image URL: ${r.url}`);
110
+ lines.push(`To show this figure to the user, embed it inline in your reply as Markdown: ![${r.figureNumber}](${r.url})`);
111
+ }
107
112
  return {
108
113
  content: [
109
114
  {
@@ -113,7 +118,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
113
118
  },
114
119
  {
115
120
  type: 'text',
116
- text: `${r.figureNumber} — ${r.caption}`,
121
+ text: lines.join('\n'),
117
122
  },
118
123
  ],
119
124
  };
@@ -1,7 +1,7 @@
1
1
  import type { ConvexHttpClient } from 'convex/browser';
2
2
  export declare const getFigureTool: {
3
3
  readonly name: "get_figure";
4
- readonly description: "Retrieve a figure (image) referenced in a section. Returns the image inline (base64) so you can see and reason about diagrams, charts, and technical drawings. Use the `id` returned by get_section in its `figures` array.";
4
+ readonly description: "Retrieve a figure (image) referenced in a section. Returns the image inline (base64) so you can see and reason about it, plus a public `url` for full-size viewing. Use the `id` returned by get_section in its `figures` array.";
5
5
  readonly inputSchema: {
6
6
  readonly type: "object";
7
7
  readonly properties: {
@@ -2,7 +2,7 @@ import { api } from '../client.js';
2
2
  import { requireApiKey } from '../auth.js';
3
3
  export const getFigureTool = {
4
4
  name: 'get_figure',
5
- description: 'Retrieve a figure (image) referenced in a section. Returns the image inline (base64) so you can see and reason about diagrams, charts, and technical drawings. Use the `id` returned by get_section in its `figures` array.',
5
+ description: 'Retrieve a figure (image) referenced in a section. Returns the image inline (base64) so you can see and reason about it, plus a public `url` for full-size viewing. Use the `id` returned by get_section in its `figures` array.',
6
6
  inputSchema: {
7
7
  type: 'object',
8
8
  properties: {
@@ -44,6 +44,7 @@ export async function handleGetFigure(client, args) {
44
44
  return {
45
45
  caption: meta.caption,
46
46
  figureNumber: meta.figureNumber,
47
+ url,
47
48
  image: { base64, mimeType },
48
49
  };
49
50
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stratta/mcp",
3
3
  "mcpName": "io.github.hugogebel-boop/stratta",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "description": "MCP server exposing Swiss engineering norms (SIA / Eurocodes) to Claude clients via Stratta TreeRAG.",
6
6
  "license": "UNLICENSED",
7
7
  "author": "Hugo Gebel <hugo.gebel@epfl.ch>",