hermoso 0.1.5 → 0.1.7

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.
@@ -8,11 +8,13 @@
8
8
  // stdout is the JSON-RPC channel — NEVER print to it. All logging goes to stderr (console.error).
9
9
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
10
10
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
11
- import { registerTools } from './tools.mjs';
11
+ import { registerTools, MCP_INSTRUCTIONS } from './tools.mjs';
12
12
  import { API_BASE } from './client.mjs';
13
13
 
14
+ // instructions = the full capability map (ad spy · create · raw model playground · account) — one source of truth
15
+ // in tools.mjs, shared with the hosted connector (http.mjs), so every surface tells agents the same breadth.
14
16
  const server = new McpServer({ name: 'hermoso-mcp', version: '1.0.0' }, {
15
- instructions: 'Hermoso generates copyable, on-brand ad creative. Typical flow: hermoso_capabilities (learn valid model ids + costs) → optionally draft_brand → plan_ad (concept + copy) → generate_image / generate_video (returns a served URL). Use find_competitors / pull_competitor_ads / research_ads to gather proven ads to remix first. Structured ad-spy when you know exactly what to pull: search_meta_ads / search_google_ads / search_linkedin_ads (ad libraries), search_tiktok / search_instagram / search_youtube / search_reddit / search_threads (organic), scrapecreators_fetch (any allowlisted endpoint). Always report the final media URL to the user.',
17
+ instructions: MCP_INSTRUCTIONS,
16
18
  });
17
19
 
18
20
  registerTools(server);
package/mcp/http.mjs CHANGED
@@ -15,7 +15,7 @@
15
15
  // ───────────────────────────────────────────────────────────────────────────────────────────────────────
16
16
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
17
17
  import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
18
- import { registerTools } from './tools.mjs';
18
+ import { registerTools, MCP_INSTRUCTIONS } from './tools.mjs';
19
19
  import { mcpCtx } from './client.mjs';
20
20
 
21
21
  // Mount the remote connector onto the Express app. No-op unless explicitly enabled + auth-backed.
@@ -51,7 +51,7 @@ export function mountRemoteMcp(app, { verifyBearer, publicBaseUrl } = {}) {
51
51
  const sid = req.headers['mcp-session-id'];
52
52
  let entry = sid && sessions.get(sid);
53
53
  if (!entry) {
54
- const server = new McpServer({ name: 'hermoso', version: '1.0.0' });
54
+ const server = new McpServer({ name: 'hermoso', version: '1.0.0' }, { instructions: MCP_INSTRUCTIONS });
55
55
  registerTools(server); // the SAME tools as stdio — but here every /api call they make carries this user's token
56
56
  const transport = new StreamableHTTPServerTransport({
57
57
  sessionIdGenerator: () => 'sess_' + Math.random().toString(36).slice(2),