WORLDBOOK

Worldbooks | WebMCP | Search | Submit WebMCP

jimeng WebMCP

Browser tool configuration for jimeng

URL Pattern: ^https?://jimeng\.jianying\.com(/.*)?$
Allowed Extra Domains: example.com, jimeng.jianying.com

Tools (1)

jimeng_history()

即梦AI 查看最近生成的作品

Parameters

limit number

JavaScript Handler

(params) => {
  const args = Object.assign({"limit": 5}, params || {});
  let data = null;
  let __wbContextUrl = globalThis.location?.href || '';
  let __wbContextDocument = globalThis.document || null;
    const __wbDefault = (value, fallback) => (value === undefined || value === null || value === '' ? fallback : value);
    const __wbJoin = (value, separator) => Array.isArray(value) ? value.join(separator) : (value ?? '');
    const __wbGet = (value, path) => {
      if (!path) return value;
      return String(path).split('.').reduce((acc, part) => (acc == null ? undefined : acc[part]), value);
    };
    const __wbBaseUrl = () => (__wbContextUrl || globalThis.location?.href || 'https://example.com/');
    const __wbResolve = (target, base) => {
      if (target == null) return '';
      const text = String(target);
      try {
        return /^https?:/i.test(text) ? text : new URL(text, base || __wbBaseUrl()).toString();
      } catch (_error) {
        return text;
      }
    };
    const __wbFetch = async (target, options) => {
      const url = __wbResolve(target, __wbBaseUrl());
      const resp = await globalThis.fetch(url, Object.assign({ credentials: 'include' }, options || {}));
      if (!resp.ok) {
        throw new Error(`HTTP ${resp.status} for ${url}`);
      }
      const text = await resp.text();
      try {
        return { url, text, data: JSON.parse(text) };
      } catch (_error) {
        return { url, text, data: text };
      }
    };
  return (async () => {
    {
      const __wbResp = await __wbFetch("https://jimeng.jianying.com/ai-tool/generate?type=image&workspace=0");
      __wbContextUrl = __wbResp.url;
      __wbContextDocument = new DOMParser().parseFromString(__wbResp.text, 'text/html');
      data = __wbContextDocument;
    }
    {
      const document = __wbContextDocument || globalThis.document;
      const location = new URL(__wbBaseUrl());
      const window = { document, location };
      const fetch = (target, options) => globalThis.fetch(__wbResolve(target, __wbBaseUrl()), Object.assign({ credentials: 'include' }, options || {}));
      data = await (((async () => {
  const limit = (args.limit);
  const res = await fetch('/mweb/v1/get_history?aid=513695&device_platform=web&region=cn&da_version=3.3.11&web_version=7.5.0&aigc_features=app_lip_sync', {
    method: 'POST',
    credentials: 'include',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ cursor: '', count: limit, need_page_item: true, need_aigc_data: true, aigc_mode_list: ['workbench'] })
  });
  const data = await res.json();
  const items = data?.data?.history_list || [];
  return items.slice(0, limit).map(item => {
    const params = item.aigc_image_params?.text2image_params || {};
    const images = item.image?.large_images || [];
    return {
      prompt: params.prompt || item.common_attr?.title || 'N/A',
      model: params.model_config?.model_name || 'unknown',
      status: item.common_attr?.status === 102 ? 'completed' : 'pending',
      image_url: images[0]?.image_url || '',
      created_at: new Date((item.common_attr?.create_time || 0) * 1000).toLocaleString('zh-CN'),
    };
  });
})())());
    }
    {
      const source = Array.isArray(data) ? data : (data == null ? [] : [data]);
      data = source.map((item, index) => ({
        "prompt": item.prompt,
        "model": item.model,
        "status": item.status,
        "image_url": item.image_url,
        "created_at": item.created_at,
      }));
    }
    if (Array.isArray(data)) data = data.slice(0, Number(args.limit) || 0);
    return data;
  })();
}

🔌 Chrome MCP Server Extension

Use these tools with Claude, ChatGPT, and other AI assistants.

Get Extension →

How to Use WebMCP

WebMCP tools are designed for browser extensions or automation frameworks. The browser extension matches the current URL against the pattern and executes the JavaScript handler when the tool is invoked.

API Endpoint:

GET /api/webmcp/match?url=https://www.jimeng.com/...