temba-mcp 0.3.4 → 0.3.5

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 +1 -1
  2. package/src/mcp.js +11 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "temba-mcp",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "MCP for Temba documentation",
5
5
  "author": "Bouwe (https://bouwe.io)",
6
6
  "scripts": {
package/src/mcp.js CHANGED
@@ -47,8 +47,17 @@ export const startMcpServer = async ({ debug = false } = {}) => {
47
47
  async ({ query }) => {
48
48
  await ensureFreshIndex(log)
49
49
 
50
- log(`Current index size: ${index.length}`)
51
- log(`First title: ${index[0]?.title}`)
50
+ if (index.length === 0) {
51
+ log('No documentation index available to search.')
52
+ return {
53
+ content: [
54
+ {
55
+ type: 'text',
56
+ text: 'Documentation is currently unavailable. Please try again later.',
57
+ },
58
+ ],
59
+ }
60
+ }
52
61
 
53
62
  const results = searchDocs(query, index).slice(0, 5) // Limit to top 5 results
54
63