MCPcopy Create free account

hub / github.com/2234839/mcpserver / functions

Functions79 in github.com/2234839/mcpserver

↓ 38 callersMethodinfo
(message: string, data?: any)
src/utils/logger.ts:22
↓ 32 callersMethoderror
(message: string, data?: any)
src/utils/logger.ts:26
↓ 29 callersFunctioncreateErrorResponse
(message: string)
src/utils/common.ts:8
↓ 17 callersFunctioncreateSuccessResponse
(result: string | object)
src/utils/common.ts:14
↓ 14 callersMethodwarn
(message: string, data?: any)
src/utils/logger.ts:34
↓ 11 callersFunctiongetEnv
()
src/utils/helpers.ts:24
↓ 10 callersFunctioncreateWebSearchError
( code: WebSearchErrorCode, message: string, hint?: string, details?: any )
src/tools/web-search/errors.ts:32
↓ 4 callersMethoddebug
(message: string, data?: any)
src/utils/logger.ts:30
↓ 4 callersMethodwriteLog
(level: string, message: string, data?: any)
src/utils/logger.ts:11
↓ 3 callersFunctiongetApiKey
()
src/utils/helpers.ts:59
↓ 3 callersFunctiongetBlockKramdown
(blockId: string)
src/tools/siyuan/block-kramdown.ts:32
↓ 3 callersMethodgetTimeToWait
* Get time to wait before next request is allowed * @returns Time in milliseconds to wait, or 0 if request is allowed
src/tools/web-search/rate-limiter.ts:78
↓ 3 callersFunctionsearchWeb
(params: SearchWebParams)
src/tools/web-search/client.ts:37
↓ 2 callersFunctioncallGLMApi
( messages: any[], options: { temperature?: number; top_p?: number; max_tokens?: number; m
src/utils/helpers.ts:83
↓ 2 callersFunctioncreateMessage
(content: any[], prompt: string)
src/utils/common.ts:1
↓ 2 callersMethoddelete
* Delete value from cache * @param key Cache key
src/tools/web-search/cache.ts:67
↓ 2 callersFunctionextractIALAttributes
(content: string)
src/tools/siyuan/block-kramdown.ts:86
↓ 2 callersFunctiongetModelConfig
(type: 'image' | 'video' | 'generation')
src/utils/helpers.ts:63
↓ 2 callersFunctionhandleApiError
(error: any)
src/tools/web-search/errors.ts:161
↓ 2 callersFunctionwithRetry
( operation: () => Promise<T>, maxRetries: number = 2, baseDelay: number = 1000 )
src/tools/web-search/errors.ts:53
↓ 2 callersFunctionwithTimeout
( operation: () => Promise<T>, timeoutMs: number )
src/tools/web-search/errors.ts:101
↓ 1 callersFunctioncalculateCost
* Calculate estimated cost of the search * @param resultCount Number of results * @returns Estimated cost
src/tools/web-search/client.ts:248
↓ 1 callersFunctioncalculateSonarCost
* Calculate estimated cost of using a Sonar model * @param model Sonar model type * @param evidenceCount Number of evidence items * @returns Estima
src/tools/web-search/sonar-client.ts:207
↓ 1 callersMethodcheckLimit
* Check if a request is allowed based on rate limit * @returns true if request is allowed, false if rate limit exceeded
src/tools/web-search/rate-limiter.ts:46
↓ 1 callersFunctioncreateCacheKey
* Create a cache key from search parameters * @param params Search parameters * @returns Cache key string
src/tools/web-search/client.ts:259
↓ 1 callersFunctiondeduplicateResults
* Deduplicate search results * @param results Search results * @param strategy Deduplication strategy * @returns Deduplicated results
src/tools/web-search/client.ts:215
↓ 1 callersFunctionencodeImageToBase64
(imagePath: string)
src/utils/helpers.ts:70
↓ 1 callersFunctionexecuteDatabaseQuery
(params: DatabaseQueryParams)
src/tools/siyuan/database-query.ts:22
↓ 1 callersFunctionexecuteSQLQuery
(stmt: string)
src/tools/siyuan/sql-query.ts:14
↓ 1 callersFunctiongenerateAnswerWithSonar
(params: SonarSearchParams)
src/tools/web-search/sonar-client.ts:32
↓ 1 callersFunctiongenerateImage
( prompt: string, options: { model?: string; quality?: 'hd' | 'standard'; size?: string; u
src/utils/helpers.ts:118
↓ 1 callersMethodget
* Get value from cache * @param key Cache key * @returns Cached value or null if not found or expired
src/tools/web-search/cache.ts:30
↓ 1 callersFunctiongetBlockKramdownMultiple
( blockIds: string[], )
src/tools/siyuan/block-kramdown.ts:41
↓ 1 callersMethodincrement
* Increment request count
src/tools/web-search/rate-limiter.ts:70
↓ 1 callersFunctionisForbiddenIP
* Check if an IP address is in a forbidden range * @param ip IP address string * @returns true if IP is forbidden, false otherwise
src/tools/web-search/security.ts:108
↓ 1 callersFunctionisIPInRange
* Check if an IP address is in a CIDR range * @param ipInt IP address as 32-bit integer * @param range CIDR range string (e.g., "192.168.0.0/16") *
src/tools/web-search/security.ts:141
↓ 1 callersFunctionisValidUrl
(urlString: string)
src/tools/web-search/security.ts:51
↓ 1 callersFunctionisWebSearchError
(error: any)
src/tools/web-search/errors.ts:146
↓ 1 callersFunctionmain
()
src/index.ts:38
↓ 1 callersFunctionmakePerplexityRequest
* Make a request to the Perplexity API * @param apiKey API key * @param payload Request payload * @returns API response
src/tools/web-search/client.ts:166
↓ 1 callersFunctionmakeSiYuanRequest
({ endpoint, data }: SiYuanApiRequest)
src/tools/siyuan/client.ts:8
↓ 1 callersFunctionmakeSonarRequest
* Make a request to the Sonar model API * @param apiKey API key * @param payload Request payload * @returns API response
src/tools/web-search/sonar-client.ts:106
↓ 1 callersFunctionnormalizeResults
* Normalize search results to a consistent format * @param results Raw results from API * @returns Normalized results
src/tools/web-search/client.ts:198
↓ 1 callersFunctionnormalizeSonarResults
* Normalize Sonar model results to a consistent format * @param sonarResult Raw result from Sonar API * @returns Normalized results with Sonar enhan
src/tools/web-search/sonar-client.ts:147
↓ 1 callersMethodparseTtlFromEnv
* Parse TTL from environment variable string * @param ttlStr TTL string in minutes * @returns TTL in milliseconds
src/tools/web-search/cache.ts:118
↓ 1 callersFunctionperformAdvancedWebSearch
(params: AdvancedWebSearchInput)
src/tools/web-search/advanced-web-search.ts:32
↓ 1 callersFunctionperformWebSearch
(params: WebSearchInput)
src/tools/web-search/web-search.ts:23
↓ 1 callersFunctionregisterAdvancedWebSearchTool
(server: McpServer)
src/tools/web-search/advanced-web-search.ts:76
↓ 1 callersFunctionregisterBlockKramdownTool
(server: McpServer)
src/tools/siyuan/block-kramdown.ts:160
↓ 1 callersFunctionregisterDatabaseQueryTool
(server: McpServer)
src/tools/siyuan/database-query.ts:48
↓ 1 callersFunctionregisterImageAnalysisTool
(server: McpServer)
src/tools/bigmodel/image-analysis.ts:8
↓ 1 callersFunctionregisterImageGenerationTool
(server: McpServer)
src/tools/bigmodel/image-generation.ts:10
↓ 1 callersFunctionregisterPollinationsAudioGenerationTool
(server: McpServer)
src/tools/pollinations/audio-generation.ts:7
↓ 1 callersFunctionregisterPollinationsImageAnalysisTool
(server: McpServer)
src/tools/pollinations/image-analysis.ts:7
↓ 1 callersFunctionregisterPollinationsImageGenerationTool
(server: McpServer)
src/tools/pollinations/image-generation.ts:7
↓ 1 callersFunctionregisterPollinationsTextGenerationTool
(server: McpServer)
src/tools/pollinations/text-generation.ts:7
↓ 1 callersFunctionregisterSQLQueryTool
(server: McpServer)
src/tools/siyuan/sql-query.ts:40
↓ 1 callersFunctionregisterSearchTool
(server: McpServer)
src/tools/siyuan/search.ts:90
↓ 1 callersFunctionregisterUpdateBlockTool
(server: McpServer)
src/tools/siyuan/block-kramdown.ts:217
↓ 1 callersFunctionregisterVideoAnalysisTool
(server: McpServer)
src/tools/bigmodel/video-analysis.ts:7
↓ 1 callersFunctionregisterWebSearchTool
(server: McpServer)
src/tools/web-search/web-search.ts:52
↓ 1 callersFunctionsanitizeUrl
(urlString: string)
src/tools/web-search/security.ts:85
↓ 1 callersFunctionsearchBlocks
(params: SearchParams)
src/tools/siyuan/search.ts:54
↓ 1 callersMethodset
* Set value in cache * @param key Cache key * @param data Data to cache * @param ttl Time to live in milliseconds (optional, defaults to defa
src/tools/web-search/cache.ts:52
↓ 1 callersMethodstartCleanupInterval
* Start periodic cleanup of expired entries
src/tools/web-search/cache.ts:94
↓ 1 callersFunctionupdateBlock
( blockId: string, data: string, dataType: 'markdown' | 'dom' = 'markdown', options: { preserveIAL
src/tools/siyuan/block-kramdown.ts:99
Methodclear
* Clear all cache entries
src/tools/web-search/cache.ts:75
Methodconstructor
()
src/tools/web-search/cache.ts:18
Methodconstructor
()
src/tools/web-search/rate-limiter.ts:13
Methodconstructor
(projectDir: string = process.cwd())
src/utils/logger.ts:7
FunctionformatError
(error: WebSearchError | Error)
src/tools/web-search/errors.ts:133
FunctiongetSecurityConfig
()
src/tools/web-search/security.ts:215
MethodgetStats
* Get cache statistics * @returns Object with cache statistics
src/tools/web-search/cache.ts:84
MethodgetStatus
* Get current rate limit status * @returns Object with current status
src/tools/web-search/rate-limiter.ts:103
FunctionisContentTypeAllowed
(contentType: string)
src/tools/web-search/security.ts:200
FunctionisResponseSizeAcceptable
(size: number)
src/tools/web-search/security.ts:191
Methodreset
* Reset rate limiter
src/tools/web-search/rate-limiter.ts:127
FunctionsanitizeHtml
(html: string)
src/tools/web-search/security.ts:170
MethodwaitUntilAllowed
* Wait until request is allowed * @returns Promise that resolves when request is allowed
src/tools/web-search/rate-limiter.ts:136