get_word_cloud
Generate a word cloud to visualize the most common keywords or phrases from the latest 5,000 patents. Refine searches by specifying keywords, IPC classification, date ranges, or patent authorities. Receive up to 100 terms for trend analysis.
Instructions
Obtain a snapshot of frequently occurring keywords/phrases from the most recent 5,000 published patents. Identify common terms for refining searches. Returns up to 100 keywords. Either keywords or IPC classification must be specified.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply_end_time | No | Patent application end year (yyyy format). Filters by application filing date. | |
| apply_start_time | No | Patent application start year (yyyy format). Filters by application filing date. | |
| authority | No | Patent authority code (e.g., CN, US, EP, JP). Filters by patent office. Use OR for multiple, e.g., "US OR EP". | |
| ipc | No | Patent IPC classification code. Used to specify a particular technology field. | |
| keywords | No | Keywords to search within patent title and abstract/summary. Supports AND, OR, NOT logic. Example: "mobile phone AND (screen OR battery)" | |
| lang | No | Language setting. Default is "en" (English). Choose "cn" (Chinese) or "en". | |
| public_end_time | No | Patent publication end year (yyyy format). Filters by publication date. | |
| public_start_time | No | Patent publication start year (yyyy format). Filters by publication date. |
Implementation Reference
- src/index.ts:224-230 (handler)The handler function implementing the core logic for the 'get_word_cloud' tool. It builds URL search parameters from input args (with default 'lang=en'), then calls the shared PatSnap API helper for the 'word-cloud' endpoint.async function getWordCloud(args: LangPatentArgs): Promise<ServerResult> { const params = buildCommonSearchParams(args); if (!args.lang) { // Add default lang if not provided params.append('lang', 'en'); } return callPatsnapApi('word-cloud', params, 'get word cloud'); }
- src/index.ts:318-324 (schema)Input schema definition (langPatentInputSchema) for language-aware patent tools including 'get_word_cloud', extending base schema with optional 'lang' property for validation.const langPatentInputSchema = { ...basePatentInputSchema, properties: { ...basePatentInputSchema.properties, lang: { type: 'string', description: 'Language setting. Default is "en" (English). Choose "cn" (Chinese) or "en".' } } };
- src/index.ts:341-345 (registration)Tool registration in ListToolsRequestSchema handler: defines name, description, and references the inputSchema for 'get_word_cloud'.{ name: 'get_word_cloud', description: 'Obtain a snapshot of frequently occurring keywords/phrases from the most recent 5,000 published patents. Identify common terms for refining searches. Returns up to 100 keywords. Either keywords or IPC classification must be specified.', inputSchema: langPatentInputSchema },
- src/index.ts:395-395 (registration)Wiring of 'get_word_cloud' tool name to its handler function (getWordCloud) in the toolImplementations dispatch map.'get_word_cloud': getWordCloud,
- src/index.ts:303-316 (schema)Base input schema (basePatentInputSchema) extended by langPatentInputSchema for common patent search parameters: keywords, ipc, date ranges, authority.const basePatentInputSchema = { type: 'object' as const, // Use 'as const' for stricter type checking properties: { keywords: { type: 'string', description: 'Keywords to search within patent title and abstract/summary. Supports AND, OR, NOT logic. Example: "mobile phone AND (screen OR battery)"' }, ipc: { type: 'string', description: 'Patent IPC classification code. Used to specify a particular technology field.' }, apply_start_time: { type: 'string', description: 'Patent application start year (yyyy format). Filters by application filing date.' }, apply_end_time: { type: 'string', description: 'Patent application end year (yyyy format). Filters by application filing date.' }, public_start_time: { type: 'string', description: 'Patent publication start year (yyyy format). Filters by publication date.' }, public_end_time: { type: 'string', description: 'Patent publication end year (yyyy format). Filters by publication date.' }, authority: { type: 'string', description: 'Patent authority code (e.g., CN, US, EP, JP). Filters by patent office. Use OR for multiple, e.g., "US OR EP".' } }, // Add a note about requiring keywords or IPC for most tools description: "Requires either 'keywords' or 'ipc' to be specified for a meaningful search. If both are provided, IPC is prioritized by the API." };