AUTHORITATIVE REFERENCE for all MCP tool development, schema design, and visual conventions.
This document defines the mandatory standards for developing MCP tools optimized for AI agent usage, ensuring tools are easily discoverable, properly invoked, and accurately interpreted by LLMs.
- Tool Description Structure
- Schema Description Principles
- Parameter Guidance Patterns
- Output Schema Enhancement
- Visual Conventions
- Master Emoji Reference
- Error Handling Guidelines
- Performance Considerations
- Documentation Standards
- Validation Checklist
- Development Workflows
- Templates and Examples
- Brief tool purpose in 1-2 sentences
- Essential capabilities and primary use cases
- Context positioning within the larger system
π― QUICK DECISION GUIDE:
βββ Need X? β Use for Y
βββ Need A? β Focus on B parameter
βββ Need C? β Filter by D: "value1" vs "value2"
βββ Need E? β Analyze F and G combinations
βββ Need H? β Check I field for J indicators
Purpose: Provide branching logic for tool selection and parameter choices.
Guidelines:
- 5-7 decision branches maximum
- Use concrete scenarios, not abstract concepts
- Include specific parameter recommendations
- Order by frequency of use (most common first)
β CRITICAL RULES:
β’ Parameter constraints and validation requirements
β’ Known limitations and error conditions
β’ Time range restrictions or data availability
β’ Required vs optional parameter behavior
β’ Breaking changes or deprecated features
Purpose: Prevent common errors and misuse.
Guidelines:
- Lead with constraints that cause API errors
- Highlight time-sensitive limitations
- Document parameter validation rules
- Include known breaking combinations
β
HIGH-VALUE PATTERNS:
1. PATTERN NAME:
{parameter_example: "value"} β Specific outcome
2. ANOTHER PATTERN:
{parameter_combination} β Expected result
Purpose: Provide concrete parameter examples with expected outcomes.
Guidelines:
- 3-5 patterns maximum
- Include actual JSON parameter examples
- Describe specific business outcomes
- Order by business value/frequency
- Parameter behavior and interaction effects
- Response structure variations
- Performance implications
- Environment-specific notes
π OPTIMAL WORKFLOWS:
1. WORKFLOW NAME:
- Step 1: Specific action
- Step 2: Based on step 1 result
- Step 3: Final analysis
2. ANOTHER WORKFLOW:
- Progressive discovery approach
- Refinement based on findings
Purpose: Guide multi-step analysis processes.
Guidelines:
- 3-4 workflows maximum
- Include conditional logic between steps
- Reference specific tool features
- Show progressive refinement patterns
parameterName: z
.type()
.constraints()
.describe(
'π§ PARAMETER TYPE: Brief description. β οΈ IMPACT LEVEL: Specific behavior notes. π‘ USE CASE: When to use this parameter. COMBINE WITH: Related parameters.',
),- π¨ HIGH IMPACT: Can reduce results to zero or cause major changes
β οΈ MODERATE IMPACT: Affects results but usually returns data- β LOW IMPACT: Minimal effect on result scope
- Visual indicator (emoji for quick scanning)
- Parameter classification (filter, control, lookup, etc.)
- Impact assessment with specific behavioral notes
- Use case guidance with concrete scenarios
- Combination recommendations with other parameters
'π§ TYPE: Primary function. β οΈ IMPACT: Effect on results (specific behavior). π‘ USE CASE: When to use (concrete scenario). COMBINE WITH: Related parameters for enhanced analysis.'
CRITICAL: All output/response schemas MUST include .optional() and .passthrough() to prevent MCP errors:
// β BAD - Will cause MCP errors when API returns unexpected data
export const BadResponseSchema = z.object({
result: z.boolean(),
message: z.string(),
content: z.array(SomeSchema),
});
// β
GOOD - Robust schema that handles API variations
export const GoodResponseSchema = z.object({
result: z.boolean().optional(),
message: z.string().optional(),
content: z.array(SomeSchema).optional(),
})
.passthrough();Why This Matters:
.optional(): Prevents errors when APIs don't return expected fields.passthrough(): Allows additional undocumented fields from API responses- Forward Compatibility: Handles API changes without breaking existing tools
- Error Resilience: Graceful handling of malformed or partial responses
// Response wrapper pattern
export const ResponseSchema = z
.object({
result: z.boolean().optional().describe('...'),
message: z.string().optional().describe('...'),
content: ContentSchema.optional().describe('...'),
})
.passthrough()
.describe('...');
// Nested object pattern
export const NestedSchema = z
.object({
field1: z.string().optional().describe('...'),
field2: z.number().optional().describe('...'),
nested: z.array(AnotherSchema).optional().describe('...'),
})
.passthrough()
.describe('...');
// Array element pattern
export const ElementSchema = z
.object({
id: z.string().optional().describe('...'),
data: z.record(z.any()).optional().describe('...'),
})
.passthrough()
.describe('...');- All object schemas use
.passthrough() - All fields are marked
.optional()unless guaranteed by API - Nested objects follow the same robustness patterns
- Array elements have robust schemas with optional fields
- Complex types handle null/undefined gracefully
fieldName: z
.type()
.optional()
.describe(
'π FIELD PURPOSE: What this field represents. BUSINESS CONTEXT: Why it matters. USE FOR: Specific analysis applications. THRESHOLDS: Decision points or significant values.',
),.describe(
'π¦ SCHEMA PURPOSE: What this structure contains. USAGE CONTEXT: When this data is most valuable. KEY PATTERNS: Important relationships between fields.',
)- Data interpretation guidance
- Business context and significance
- Decision thresholds and key values
- Cross-reference capabilities
- Pattern recognition hints
- Start broad, filter down: Always recommend default values first
- Combination effects: Explain multiplicative filtering
- Zero result scenarios: When filters may return empty data
- Performance impact: Large vs small result sets
- Exploration strategy: Start small (5-10), scale up (20-50)
- Maximum limits: Document API constraints
- Total count usage: How to estimate dataset size
- Performance considerations: Balance detail vs speed
- Validation constraints: API-enforced limitations
- Granularity effects: How time windows affect detail
- Recent vs historical: Data freshness considerations
- Error handling: How to interpret time validation errors
- Format requirements: Expected patterns and validation
- Cross-reference usage: How to connect with other data
- Availability patterns: When identifiers might be null
- Deep-dive workflows: Progressive analysis approaches
ResponseSchema = z.object({
result: z.boolean().optional().describe(
'β
API SUCCESS: Indicates successful operation. False values require checking message field for error details and potential parameter adjustment.',
),
message: z.string().optional().describe(
'π¬ STATUS MESSAGE: Human-readable response status. Critical for error handling, debugging parameter issues, and understanding API constraints.',
),
content: DataSchema.optional().describe(
'π MAIN PAYLOAD: Primary data when result=true. Contains [specific data type]. Null when API errors occur.',
),
})- Value ranges and typical distributions
- Threshold significance (e.g., ">100 indicates high intensity")
- Comparison context (relative to other fields)
- Business impact interpretation
- Format patterns and examples
- Enumeration values when applicable
- Cross-reference usage with other fields
- Parsing requirements for complex strings
- Empty array meaning (no data vs filtered out)
- Element relationships and ordering
- Length significance (what counts indicate)
- Iteration patterns for analysis
- Nested field priorities (which to examine first)
- Relationship patterns between fields
- Conditional logic (when fields might be null)
- Analysis workflows for complex structures
Visual indicators function as cognitive anchors that significantly enhance AI text processing efficiency:
- Pattern Recognition: Rapid identification of information types without semantic analysis
- Information Chunking: Breaking complex documentation into semantically meaningful units
- Rapid Scanning: Non-linear navigation to relevant sections based on visual cues
- Consistent Mental Models: Maintaining systematic categorization frameworks across tools
- Context Switching: Efficient transitions between different analysis modes (parameters β outputs β workflows)
Visual indicators create semantic bookmarks that enable systematic thinking at scale, similar to how syntax highlighting aids code parsing. They prevent regression to generic, unstructured descriptions by maintaining visual vocabulary consistency.
- Reduced Cognitive Load: Immediate visual context about information hierarchy and types
- Improved Accessibility: More approachable dense technical documentation
- Faster Navigation: Quick identification of relevant sections during development
- Modern Documentation Style: Enhanced readability and professional presentation
Visual indicators create a structured vocabulary that enables both AI systems and humans to maintain rigorous documentation standards. They function as external memory aids that preserve systematic approaches across different tools and contexts.
- π― Decision Logic: Quick guides and branching scenarios
- β Constraints: Critical rules and limitations
- β Patterns: High-value usage examples and recommendations
β οΈ Warnings: Important behavioral notes and cautions- π Workflows: Multi-step processes and methodologies
- π§ Controls: Pagination, sizing, formatting parameters
- π― Filters: Data subset selection and scoping
- π Lookups: Specific entity targeting and deep-dive analysis
- π Scope: Platform, source, type filters
- β° Temporal: Time ranges and intervals
- π‘ Strategy: Usage guidance and recommendations
- π Metrics: Numeric values and measurements
- π·οΈ Identifiers: IDs, names, categories, and labels
- π Analytics: Calculated values and insights
- π Collections: Arrays and lists
- π’ Totals: Count values and summations
- π Documentation: Descriptions and explanatory text
- β° Start/Creation/Detection: When something begins (TIME RANGE START, ATTACK START, DETECTION TIMESTAMP, DISCOVERY TIMESTAMP)
- π End/Completion/Finish: When something definitively concludes (TIME RANGE END, ATTACK END - checkered flag = finish line)
- π Current/Latest/Status: Most recent or current state (LATEST ACTIVITY, LATEST OCCURRENCE, LATEST OBSERVATION)
- β±οΈ Measurement/Interval/Rate: Time calculations and metrics (INTERVAL TIMESTAMP, RATE CALCULATION BASIS, DATA FRESHNESS)
AI Processing Benefits:
- Pattern Recognition: Instant visual identification of time field types
- Decision Logic: Clear semantic meaning guides parameter selection
- Context Awareness: Understand time field purposes without semantic analysis
- Consistency: Eliminates confusion between similar time concepts
Developer Benefits:
- Intuitive Understanding: Visual metaphors match conceptual meaning
- Quick Scanning: Rapid identification of time field categories in documentation
- Reduced Errors: Clear semantic boundaries prevent misuse
- Professional Documentation: Consistent visual vocabulary across all schemas
- β Success: API status and validation indicators
- π¬ Messages: Status and error information
- π¦ Containers: Response wrappers and primary payloads
- π Inventories: Complete data collections and catalogs
- π¨ High Impact: Critical parameters that can drastically affect results
- π‘οΈ Security: Protection, blocking, and defense-related fields
- π§ͺ Simulation: Test modes and simulated actions
- π€ Automation: Bot traffic and automated behavior
- π Operational State: Status indicators and system health
- β‘ Intensity: Rate-based metrics and performance indicators
- π Sophistication: Assessment levels and threat classifications
- π’ Application: Business applications and organizational context
- π Cross-Domain: Multi-domain and infrastructure relationships
- π Volume: Traffic volumes and scale metrics
- π― Targeting: Attack targets and focus areas
- RED (β
β οΈ π¨): Warnings, errors, constraints, high-impact changes - GREEN (β π‘): Success, patterns, recommendations, guidance
- BLUE (π§ππ): Technical details, controls, analysis tools
- YELLOW (π―β‘): Decision points, priorities, performance metrics
AUTHORITATIVE EMOJI VOCABULARY - All MCP tool development must follow this reference.
- π― Decision Logic: Quick guides and branching scenarios
- β Constraints: Critical rules and limitations
- β Patterns: High-value usage examples and recommendations
β οΈ Warnings: Important behavioral notes and cautions- π Workflows: Multi-step processes and methodologies
- π§ Controls: Pagination, sizing, formatting parameters
- π― Filters: Data subset selection and scoping
- π Lookups: Specific entity targeting and deep-dive analysis
- π Scope: Platform, source, type filters
- π‘ Strategy: Usage guidance and recommendations
- π« Exclusions: Status filters and negative selections
- π Pagination: Page control and navigation
- π Size Control: Result limiting and performance management
- β° Start/Creation/Detection: When something begins
- TIME RANGE START, ATTACK START, DETECTION TIMESTAMP, DISCOVERY TIMESTAMP
- π End/Completion/Finish: When something definitively concludes
- TIME RANGE END, ATTACK END (checkered flag = finish line)
- π Current/Latest/Status: Most recent or current state
- LATEST ACTIVITY, LATEST OCCURRENCE, LATEST OBSERVATION
- β±οΈ Measurement/Interval/Rate: Time calculations and metrics
- INTERVAL TIMESTAMP, RATE CALCULATION BASIS, DATA FRESHNESS
- π Date Context: Date formatting and temporal context
- π Metrics: Numeric values and measurements
- π·οΈ Identifiers: IDs, names, categories, and labels
- π Analytics: Calculated values and insights
- π Collections: Arrays and lists
- π’ Totals: Count values and summations
- π Documentation: Descriptions and explanatory text
- π¨ High Impact/Severity: Critical parameters, vulnerabilities, high-risk items
- π‘οΈ Security/Protection: Blocking, defense-related fields
- π§ͺ Simulation/Testing: Test modes, simulated actions
- π Operational State: Status indicators, workflow tracking
- β‘ Intensity/Performance: Rate-based metrics, performance indicators
- π Sophistication: Assessment levels, threat classifications
- ποΈ Review/Monitoring: Under review status, observation
- π« Exclusion/Blocking: Status exclusions, blocked content
- π€ Automation/Bots: Bot traffic, automated behavior
- π₯οΈ UI/Integration: User interface, frontend integration
- ποΈ Storage/Data: Data storage, browser storage access
- π Cryptographic/Keys: Hashes, unique identifiers, keys
- π¦ Components/Packages: Software packages, libraries, containers
- π§ Technical Tools: Controls, configuration, technical parameters
- π’ Application/Organization: Business applications, organizational context
- π Network/Domain: Cross-domain activity, hosting, network relationships
- π― Targeting/Focus: Attack targets, specific focus areas
- π Volume/Scale: Traffic volumes, scale metrics
- π³ Financial/Payment: Payment-related, financial transactions
- π Authentication: Login, authentication-related
- ποΈ Commerce: Shopping, product-related activities
- β Success: API status and validation indicators
- π¬ Messages: Status and error information
- π¦ Containers: Response wrappers and primary payloads
- π Inventories: Complete data collections and catalogs
- βοΈ Attack Classification: Threat types, attack categories
- π¬ Technical Analysis: Detailed technical analysis, signatures
- π₯ Impact Scope: User impact, affected populations
- π΅οΈ Investigation: Forensic analysis, investigation tracking
- π Attribution: Links, connections, attack attribution
- π Affected Resources: Pages, elements, resources under attack
- π Element Identification: DOM IDs, element targeting
- π·οΈ HTML Elements: Tag types, element manipulation
- β Injection/Addition: Content injection, element insertion
- β Removal/Deletion: Content removal, element deletion
- RED (β
β οΈ π¨): Warnings, errors, constraints, high-impact changes - GREEN (β π‘): Success, patterns, recommendations, guidance
- BLUE (π§ππ): Technical details, controls, analysis tools
- YELLOW (π―β‘): Decision points, priorities, performance metrics
Semantic Consistency: Each emoji has a specific, logical purpose following natural metaphors:
- β° Alarm Clock = Beginning/Initiation (when something starts)
- π Checkered Flag = Completion/Finish Line (when something definitively ends)
- π Clock Face = Current Time/Status (what's happening now)
- β±οΈ Stopwatch = Measurement/Performance (time calculations)
AI Processing Benefits:
- Pattern Recognition: Instant visual identification of time field types
- Decision Logic: Clear semantic meaning guides parameter selection
- Context Awareness: Understand time field purposes without semantic analysis
- Consistency: Eliminates confusion between similar time concepts
Developer Benefits:
- Intuitive Understanding: Visual metaphors match conceptual meaning
- Quick Scanning: Rapid identification of time field categories in documentation
- Reduced Errors: Clear semantic boundaries prevent misuse
- Professional Documentation: Consistent visual vocabulary across all schemas
- Mandatory Compliance: All new schema descriptions must use emojis from this reference
- Semantic Accuracy: Choose emojis based on functional meaning, not visual appeal
- Consistency: Use the same emoji for the same functional concept across all tools
- Single Emoji Rule: Use one primary emoji per field description for clarity
- Update Process: New emoji usage must be documented in this reference first
- All emojis used are from this authoritative reference
- Time-related fields follow the standardized 4-emoji system
- Functional categories match emoji semantic meaning
- No duplicate or inconsistent emoji usage
- New emojis added to reference before use
// In descriptions, include validation guidance:
'β οΈ VALIDATION: Parameter must be X. Invalid values cause Y error. Use Z format for best results.'// Always include error interpretation in result fields:
result: z.boolean().describe(
'β
API SUCCESS: False values require checking message field for [specific error types] and potential parameter adjustment.',
),// Distinguish between different empty states:
content: z.array().describe(
'π DATA ARRAY: Empty array indicates [no data vs filtered out vs time range issues]. Use length for quick assessment.',
),- Document constraints: API-enforced time limits
- Error recovery: How to adjust parameters when validation fails
- Fallback strategies: Alternative approaches when preferred ranges unavailable
- Start small: Recommend initial small page sizes for exploration
- Scale appropriately: Guidance for production usage patterns
- Maximum limits: Document API constraints and error behaviors
- Balance considerations: Detail vs speed tradeoffs
- Multiplicative effects: How combined filters reduce result scope
- Performance optimization: Which parameters are most selective
- Caching implications: How parameters affect response time
- Resource consumption: Memory and processing considerations
- Pagination strategies: When and how to implement
- Field selection: Guidance on requesting only needed data
- Batch processing: Optimal approaches for large datasets
- Rate limiting: API usage patterns and constraints
- Always include concrete JSON parameter examples
- Show progressive refinement from broad to specific
- Demonstrate error handling and recovery
- Illustrate optimal workflows with real scenarios
- Connect technical parameters to business outcomes
- Explain the "why" behind parameter combinations
- Provide decision-making frameworks
- Include success metrics and KPIs
- Version compatibility: How descriptions should evolve
- Backward compatibility: Maintaining existing guidance
- Deprecation patterns: How to handle removed features
- Update frequency: When to refresh examples and patterns
- Reference related tools appropriately
- Explain workflow connections between tools
- Provide integration patterns and examples
- Document data flow and dependencies
MANDATORY VALIDATION - Every MCP tool must pass this complete checklist before deployment.
- Quick Decision Guide with 5-7 concrete scenarios using proper emojis (π―)
- Critical Rules covering major constraints with warning emojis (β
β οΈ ) - High-Value Patterns with JSON examples and success indicators (β )
- Technical Insights with behavioral notes and proper categorization
- Optimal Workflows with multi-step processes using workflow emojis (π)
- Visual indicators from Master Emoji Reference for all parameters
- Impact level classification (HIGH/MODERATE/LOW) with proper emojis
- Use case guidance with concrete scenarios and business context
- Combination recommendations documented with other parameters
- Validation rules and error conditions clearly specified
- Time parameters follow 4-emoji standardized system (β°ππβ±οΈ)
- All object schemas use
.passthrough()for API resilience - All fields marked
.optional()unless guaranteed by API - Field-by-field usage guidance with proper emoji categorization
- Business context and interpretation provided
- Decision thresholds and key values documented
- Cross-reference capabilities explained
- Pattern recognition hints included
- All emojis sourced from Master Emoji Reference
- Time fields use standardized emoji system consistently
- Functional categories match emoji semantic meaning
- No duplicate or inconsistent emoji usage within tool
- Color coding follows RED/GREEN/BLUE/YELLOW system
- Parameter validation guidance included
- API error interpretation provided for result fields
- Empty result state explanations documented
- Recovery strategies and fallback approaches specified
- Parameter sizing recommendations provided
- Filtering impact assessments documented
- Resource consumption guidance included
- Optimization strategies specified
- Code examples include concrete JSON parameter examples
- Business context connects technical parameters to outcomes
- Cross-tool relationships properly referenced
- Maintenance guidelines for future updates included
-
Requirements Analysis:
- Define business use cases and user needs
- Identify API capabilities and constraints
- Determine integration points with existing tools
-
Schema Design:
- Design input parameters following Parameter Classification
- Create output schemas with mandatory
.optional()and.passthrough() - Apply Master Emoji Reference for all descriptions
-
Tool Description Creation:
- Write Quick Decision Guide with 5-7 scenarios
- Document Critical Rules and constraints
- Provide High-Value Patterns with JSON examples
- Create Optimal Workflows for multi-step processes
-
Validation and Testing:
- Run complete Validation Checklist
- Test with real API calls and edge cases
- Validate emoji usage against Master Reference
- Verify error handling and empty result scenarios
-
Documentation Integration:
- Update cross-tool relationships
- Add to relevant workflow documentation
- Update Master Emoji Reference if new emojis needed
-
Field Analysis:
- Identify missing business context in field descriptions
- Determine appropriate emoji from Master Reference
- Assess impact level and usage patterns
-
Description Enhancement:
- Follow field description template pattern
- Include decision thresholds and key values
- Provide cross-reference capabilities
- Add pattern recognition hints
-
Consistency Validation:
- Ensure emoji usage matches Master Reference
- Verify time fields follow 4-emoji system
- Check color coding compliance
- Validate against existing tool patterns
-
New Emoji Evaluation:
- Assess functional need for new emoji
- Determine semantic category and meaning
- Verify no existing emoji serves the purpose
- Document usage guidelines and examples
-
Reference Updates:
- Add new emoji to appropriate category
- Update usage guidelines if needed
- Validate across all existing tools
- Update color coding system if required
-
Deprecation Process:
- Identify inconsistent or redundant emojis
- Plan migration strategy for existing usage
- Update Master Reference with deprecation notes
- Implement changes across all affected tools
-
Peer Review Process:
- Technical accuracy validation
- Business context verification
- Emoji usage compliance check
- Documentation completeness review
-
Testing Requirements:
- Real API integration testing
- Error condition validation
- Performance impact assessment
- Cross-tool integration verification
-
Deployment Checklist:
- Complete Validation Checklist passed
- Master Emoji Reference compliance verified
- Documentation integration completed
- Cross-references updated
parameterName: z
.type()
.constraints()
.describe(
'π§ PARAMETER TYPE: Brief functional description. β οΈ IMPACT LEVEL: Specific behavioral notes and constraints. π‘ USE CASE: When to use with concrete scenarios. COMBINE WITH: Related parameters for enhanced analysis.',
),// Start time
startTime: z
.string()
.describe(
'β° TIME RANGE START: ISO 8601 datetime string defining analysis period beginning. π― FORMAT: "2024-01-15T10:00:00Z". β οΈ CONSTRAINT: Must be within last 2 weeks (API enforced). π‘ STRATEGY: Use shorter windows (6-24 hours) for granular attack timelines, longer periods (1-3 days) for pattern analysis.',
),
// End time
endTime: z
.string()
.describe(
'π TIME RANGE END: ISO 8601 datetime string defining analysis period conclusion. π― FORMAT: "2024-01-15T16:00:00Z". β οΈ CONSTRAINT: Must be after startTime and within API limits. π‘ STRATEGY: Use current time for real-time monitoring, specific timestamps for historical incident analysis.',
),
// Current status time
lastSeen: z
.string()
.optional()
.describe(
'π LATEST ACTIVITY: ISO 8601 timestamp of most recent observation. β
ACTIVE STATUS: Recent timestamps confirm ongoing activity. π PERSISTENCE: Monitor for escalation patterns.',
),
// Measurement interval
timestamp: z
.number()
.optional()
.describe(
'β±οΈ INTERVAL TIMESTAMP: Timestamp for the measurement interval (milliseconds since epoch). Essential for time-series visualization and trend analysis.',
),fieldName: z
.type()
.optional()
.describe(
'π FIELD PURPOSE: What this field represents and contains. BUSINESS CONTEXT: Why it matters for decision-making. USE FOR: Specific analysis applications and workflows. THRESHOLDS: Decision points or significant values to monitor.',
),.describe(
'π¦ SCHEMA PURPOSE: What this structure contains and represents. USAGE CONTEXT: When this data is most valuable for analysis. KEY PATTERNS: Important relationships between fields and decision frameworks.',
)Tool brief description highlighting essential capabilities and primary use cases.
π― QUICK DECISION GUIDE:
βββ Need X analysis? β Use parameter Y for focused results
βββ Need broad overview? β Start with defaults, filter down progressively
βββ Need specific entity? β Use entityId parameter for targeted lookup
βββ Need time-based trends? β Apply time filters with optimal window sizes
βββ Need cross-reference? β Combine with related tools for comprehensive analysis
β CRITICAL RULES:
β’ Time range must be within last 2 weeks (API enforced)
β’ Empty arrays for filters cause validation errors
β’ Page size limit: 50 maximum (larger values cause errors)
β’ Required parameters: must provide at least one valid identifier
β
HIGH-VALUE PATTERNS:
1. BROAD DISCOVERY:
{startTime: "<ISO_TIME_3_HOURS_AGO>", endTime: "<ISO_TIME_NOW>", pageSize: 10}
β Complete overview with manageable detail for initial assessment
2. FOCUSED ANALYSIS:
{entityId: "specific-id", timeRange: "6_hours_ago"}
β Deep dive into specific entity with recent activity focus
3. TREND ANALYSIS:
{startTime: "<ISO_TIME_24_HOURS_AGO>", endTime: "<ISO_TIME_NOW>", pageSize: 50}
β Comprehensive trend data for pattern identification
β οΈ TECHNICAL INSIGHTS:
β’ Parameter combinations are multiplicative (filters stack to reduce scope)
β’ Large time windows provide context but slower performance
β’ Pagination enables systematic analysis of large datasets
β’ Empty results may indicate filtering too restrictive or no activity
π OPTIMAL WORKFLOWS:
1. DISCOVERY WORKFLOW:
- Start with broad parameters for landscape overview
- Identify areas of interest from initial results
- Refine with specific filters for targeted analysis
- Cross-reference with related tools for comprehensive insights
2. INCIDENT RESPONSE WORKFLOW:
- Use specific identifiers for immediate threat focus
- Apply recent time windows for current activity assessment
- Escalate based on severity indicators and business impact
- Document findings for compliance and knowledge transfer
Response provides [specific data type] optimized for [primary use cases] with [key benefits for decision-making].
export const ExampleInputSchema = z.object({
entityId: z
.string()
.min(1, 'entityId is required')
.describe(
'π ENTITY IDENTIFIER: Unique identifier for targeted analysis. π― REQUIRED: Must provide valid entity ID. π‘ USE CASES: Incident response, detailed investigation, compliance auditing. π RETURNS: Complete entity profile with security status and activity timeline.',
),
startTime: z
.string()
.describe(
'β° TIME RANGE START: ISO 8601 datetime string defining analysis period beginning. π― FORMAT: "2024-01-15T10:00:00Z". β οΈ CONSTRAINT: Must be within API limits. π‘ STRATEGY: Use shorter windows for real-time monitoring, longer periods for trend analysis.',
),
pageSize: z
.number()
.int()
.min(1)
.max(50)
.optional()
.default(10)
.describe(
'π RESULT SIZE CONTROL: Maximum records to return per request. β οΈ LIMIT: Maximum 50 (larger values cause errors). π‘ STRATEGY: Start small (5-10) for exploration, use larger (20-50) for comprehensive analysis.',
),
});
export const ExampleOutputSchema = z
.object({
result: z
.boolean()
.optional()
.describe(
'β
API SUCCESS: Indicates successful operation completion. False values require checking message field for error details and potential parameter adjustment.',
),
message: z
.string()
.optional()
.describe(
'π¬ STATUS MESSAGE: Human-readable response status. Critical for error handling, debugging parameter issues, and understanding API constraints.',
),
content: z
.object({
entityData: z
.string()
.optional()
.describe(
'π ENTITY INFORMATION: Core entity data and metadata. Essential for business analysis and decision-making workflows.',
),
metrics: z
.number()
.optional()
.describe(
'π PERFORMANCE METRICS: Quantitative measurements for assessment. Use for trend analysis and threshold-based alerting.',
),
})
.passthrough()
.optional()
.describe(
'π¦ MAIN PAYLOAD: Primary data when result=true. Contains comprehensive entity analysis and metrics. Null when API errors occur.',
),
})
.passthrough()
.describe(
'π¦ API RESPONSE: Complete response wrapper with success indicators and structured data payload. Check result field first, then parse content for business analysis.',
);Following these best practices ensures MCP tools are optimized for AI agent usage with clear decision logic, comprehensive parameter guidance, and actionable output interpretation. This document serves as the authoritative reference for all MCP tool development.