We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vergil333/jsm-assets-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test-examples.md•4.33 kB
# Test Examples for JSM Assets MCP Server
This file contains example queries and commands to test the MCP server functionality.
## Setup Test Environment
Before testing, ensure you have:
1. Set the environment variables in `.env`
2. Built the project with `npm run build`
3. The server configured in Claude Desktop
## Example Test Queries
### 1. Test Object Schemas
```
Ask Claude: "What object schemas are available in this JSM workspace?"
```
*Expected: List of all schemas with IDs, names, and counts*
### 2. Test AQL Search - Installation Packages
```
Ask Claude: "Search for assets using AQL with the query: objectType=\"Installation Package\" AND Key startswith IASM"
```
*Expected: List of Installation Package assets with keys starting with IASM*
### 2a. Test AQL Search with Automatic Pagination
```
Ask Claude: "Search for ALL Installation Package assets using automatic pagination"
```
*Expected: Complete results across multiple pages with pagination info*
### 3. Test Object Types for a Schema
```
Ask Claude: "Get all object types for schema ID 1"
```
*Expected: List of object types within that schema*
### 4. Test Object Attributes
```
Ask Claude: "Show me the attributes for object type ID 10"
```
*Expected: Detailed attribute list with types and properties*
### 5. Test Child Objects Search
```
Ask Claude: "Search for child objects of type 'Hardware' with key prefix 'HW'"
```
*Expected: Hardware assets and their children with HW prefix (uses automatic pagination by default)*
### 6. Test Date Range Filtering
```
Ask Claude: "Find child objects of 'Hardware' type created between 2023-01-01 and 2023-12-31"
```
*Expected: Hardware objects created in 2023*
## Advanced Test Scenarios
### Complex AQL Queries
```
objectType IN objectTypeAndChildren("Hardware") AND "Created" >= "2023-01-01 00:00" AND "Created" <= "2023-12-31 23:59"
```
### Multi-condition Searches
```
objectType="Server" AND Status = "Active" AND Location like "%DataCenter%"
```
### Hierarchical Queries
```
objectType IN objectTypeAndChildren("Infrastructure") AND Key startswith "INF"
```
### Pagination Test Scenarios
#### Test Large Dataset Retrieval
```
Ask Claude: "Get ALL Hardware assets with automatic pagination - ensure we don't miss any results"
```
*Expected: Complete dataset with pagination info showing pages fetched*
#### Test Pagination Limits
```
Ask Claude: "Search for assets with automatic pagination but limit to 5 pages maximum"
```
*Expected: Results with warning if pagination limit reached*
#### Test Single Page vs Multi-Page
```
Ask Claude: "Compare single page search vs automatic pagination for Installation Packages"
```
*Expected: Demonstration of difference between approaches*
## Troubleshooting Test Issues
### Authentication Problems
- Verify the token in `.env` is correct and properly encoded
- Check workspace ID matches your JSM instance
- Ensure you have read permissions for Assets
### Query Errors
- Validate object type names exist in your workspace
- Check schema IDs are valid numbers
- Ensure AQL syntax is correct
### No Results
- Try broader search criteria
- Check if the workspace has data in the queried object types
- Verify object type names are exact matches
## Expected Response Format
All tools should return formatted text with:
- Summary of results found
- Detailed object information including:
- Object key and label
- Object type
- Creation/update dates
- Relevant attributes
- Hierarchical relationships (where applicable)
## Performance Testing
### Robust Pagination Testing
Test the new pagination features:
#### Automatic Pagination (Recommended)
```
Ask Claude: "Enable automatic pagination and search for all Infrastructure assets"
```
- Uses reliable "returned count < requested count" logic
- Automatically fetches all pages
- Safe with built-in maxPages limits
#### Single Page (Traditional)
```
Ask Claude: "Search Infrastructure assets with single page only (autoPages=false)"
```
- Use for quick previews or when you know data is small
- Monitor response times for complex queries
#### Large Dataset Handling
```
Ask Claude: "Get complete dataset for Hardware objects - use maximum safety (20 pages limit)"
```
- Tests safety limits and large dataset retrieval
- Verify pagination info shows pages fetched and total retrieved