Static source inference · medium confidence · detected: Logging
Deprecated protocol patterns detected
Summary
This server has 23 tools with basic schemas and descriptions, but exhibits significant gaps in documentation quality, error handling, and specification completeness. Most tools have names starting with action verbs (get_, create_, update_, list_) which is good, but descriptions are inconsistent, some are under 20 characters, many lack actionable context for LLM selection. Parameter descriptions exist but are often minimal. Output schemas are not documented. Error handling is rudimentary (e.g., bare 'error' fields with no recovery guidance). The server uses fastmcp with STDIO transport, which limits protocol readiness. Pydantic models are defined for complex inputs (GroupCreate, ContactFieldCreate, CannedResponseCreate) but not consistently applied across all tools. The codebase shows basic HTTP API integration but lacks idempotency markers, permission gates, and audit trails.
Output schemas not documented. Tools return raw API responses without documenting expected fields, making it difficult for LLMs to plan downstream operations or extract required data for chaining.
Minimal error handling with no recovery guidance. Functions return bare {'error': 'message'} or catch generic exceptions. Errors do not categorize as retryable/user-fixable/fatal, do not explain what the LLM should do next, and do not include invalid values in error responses.
Recommendations
Add output schema documentation to all tools. For each tool, document the structure of the return value, key fields, and what IDs are included for chaining. Example: 'Returns {ticket: {id, subject, status, priority, ...}, pagination: {current_page, total_pages}}' in tool docstring.
Enhance error handling with recovery guidance. Catch specific HTTP status codes (400, 401, 403, 404, 429, 500) and return: (1) error category (retryable/user-fixable/fatal), (2) what the user should do next, (3) invalid values if applicable. Example: 'Ticket not found. Try calling get_tickets to find the correct ticket ID.'
Add tool annotations. Use FastMCP's annotation features (or OpenAPI x-* extensions) to mark: readOnlyHint=true for all list_/get_/view_ tools; destructiveHint=true for delete_ticket_summary; idempotentHint=true for idempotent operations. This guides LLM planning.
Require explicit confirmation for delete_ticket_summary. Implement a 'confirm_delete' parameter (boolean, default false) or a separate 'confirm_delete_ticket_summary' tool that requires a matching ticket_id. Prevent accidental data loss.
Add search_tickets tool with filtering by status, priority, assignee, updated_since, created_since, tags. This is a core workflow tool missing from the current set.
Strengthen parameter constraints. Replace 'integer|string' with separate typed parameters or use enums. Example: source should be an enum {EMAIL, PORTAL, PHONE, CHAT, FEEDBACK_WIDGET, OUTBOUND_EMAIL} mapped to integers internally.
Spec posture evidence
Inferred effective spec: <=2025-11-25.
Relies on Logging (deprecated) - log to stderr or use OpenTelemetry
Destructive tool delete_ticket_summary lacks confirmation/dry-run pattern. No permission checks before deletion. Agents can destroy data without explicit confirmation, violating irreversible operation safety.
No tool annotations. Tools lack readOnlyHint, destructiveHint, or idempotentHint metadata. LLMs cannot determine which tools are safe to call speculatively and which require user approval.
Missing descriptions for multiple tools are under 20 characters or generic. Examples: get_ticket_fields ('Get ticket fields from Freshdesk.' - 35 chars but lacks context for when/why), delete_ticket_summary (40 chars, no explanation of consequence), list_solution_folders (50 chars, no actionable context). Descriptions under ~50 chars provide insufficient LLM guidance for tool selection.
No audit logging or trace. Credentials (FRESHDESK_API_KEY) are injected via environment, which is correct, but no logging of who called what tool, when, or with what parameters. Compliance and incident response require this.
No input validation in tools. E.g., create_ticket accepts custom_fields and additional_fields as generic objects without schema validation. LLMs can pass invalid Freshdesk field keys, causing API errors with no guidance for recovery.
Inconsistent parameter naming and types. Some params accept 'integer|string' (e.g., source, priority, status in create_ticket; ticket_id in get_ticket) but descriptions do not clarify when to use ID vs string. Enum values are documented in code comments but not enforced in schemas.
No batch operations. Tools like add_labels_to_ticket or assign_agent_to_tickets do not exist as batch variants. Agents must loop to assign multiple agents to a ticket, wasting tokens and latency.
Missing tool: search_tickets or filter_tickets. Agents cannot query by status, priority, assignee, or date range. Only get_tickets with pagination exists. No search/filter capability limits practical usability for common workflows (e.g., 'find all urgent tickets assigned to me').
Add input validation with clear error messages. Validate custom_fields and additional_fields against known Freshdesk field schemas. Return: 'Invalid field name: field_123 does not exist. Available fields: status, priority, subject, ...'
Implement audit logging. Log every tool call with timestamp, tool name, parameters (redacted if sensitive), result, and duration. Write to stderr or send to OpenTelemetry collector for compliance and debugging.
Expand descriptions to 50 - 150 characters with actionable context. Example current: 'Get tickets from Freshdesk with pagination support.' (49 chars). Better: 'Fetch paginated list of tickets. Use this to discover ticket IDs before calling get_ticket or update_ticket. Supports filtering by page and per_page (1 - 100). Returns ticket summaries with IDs for chaining.' (180 chars, within budget, actionable).