get_word_cloud
Generate a word cloud from recent patents to identify key terms and trends for refining patent searches and 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
| Name | Required | Description | Default |
|---|---|---|---|
| keywords | No | Keywords to search within patent title and abstract/summary. Supports AND, OR, NOT logic. Example: "mobile phone AND (screen OR battery)" | |
| ipc | No | Patent IPC classification code. Used to specify a particular technology field. | |
| apply_start_time | No | Patent application start year (yyyy format). Filters by application filing date. | |
| apply_end_time | No | Patent application end year (yyyy format). Filters by application filing date. | |
| public_start_time | No | Patent publication start year (yyyy format). Filters by publication date. | |
| public_end_time | No | Patent publication end year (yyyy format). Filters by publication 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". | |
| lang | No | Language setting. Default is "en" (English). Choose "cn" (Chinese) or "en". |
Implementation Reference
- src/index.ts:224-230 (handler)Handler function for the 'get_word_cloud' tool. Builds URL parameters from input arguments (with default lang='en'), and 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)JSON input schema for language-aware patent tools including 'get_word_cloud'. Extends base schema with optional 'lang' field for English/Chinese.
const langPatentInputSchema = { ...basePatentInputSchema, properties: { ...basePatentInputSchema.properties, lang: { type: 'string', description: 'Language setting. Default is "en" (English). Choose "cn" (Chinese) or "en".' } } }; - src/index.ts:213-214 (schema)TypeScript type definitions for input arguments. BasePatentArgs for common fields, LangPatentArgs extends it with optional 'lang' for tools like get_word_cloud.
type BasePatentArgs = { keywords?: string; ipc?: string; apply_start_time?: string; apply_end_time?: string; public_start_time?: string; public_end_time?: string; authority?: string }; type LangPatentArgs = BasePatentArgs & { lang?: string }; - src/index.ts:342-345 (registration)Tool registration in the ListTools handler. Defines name, description, and references the input schema.
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)Maps the tool name 'get_word_cloud' to its handler function in the dispatch object used by CallToolRequest handler.
'get_word_cloud': getWordCloud,