Server Feature Utilities
MCP server feature utility methods for argument completion, structured logging, and pagination using JSON-RPC 2.0 protocol.
Protocol Overview
This endpoint provides three server feature utility methods as defined in the MCP 2025-03-26 specification:
completion/complete
- Argument autocompletion for prompts and resource URIslogging/setLevel
- Set minimum log level for server notifications- Cursor-based pagination - For paginating large result sets in list operations
All methods use JSON-RPC 2.0 over HTTP with tenant-specific endpoints.
Prerequisites
- Valid OAuth Token - Bearer token from Cognito authentication
- MCP Session - Initialized via
initialize
method - Tenant Context - Valid tenant path (e.g.,
/pipedrive/mcp
,/hubspot/mcp
)
Completion Utility
completion/complete
Provides argument autocompletion suggestions for prompts and resource URIs. Enables rich, IDE-like experiences where users receive contextual suggestions while entering argument values.
Request
Parameters
Field | Type | Required | Description |
---|---|---|---|
ref | Object | Yes | Reference to prompt or resource |
ref.type | String | Yes | Either "ref/prompt" or "ref/resource" |
ref.name | String | Conditional | Required for ref/prompt |
ref.uri | String | Conditional | Required for ref/resource |
argument | Object | Yes | Argument being completed |
argument.name | String | Yes | Name of the argument |
argument.value | String | Yes | Current partial value |
Response
Completion Features
- Prompt Arguments: Contextual suggestions based on argument names (language, type, status, format)
- Resource URIs: URI completion based on available resources
- Maximum Results: Limited to 100 suggestions per request
- Fuzzy Matching: Partial string matching for suggestions
Logging Utility
logging/setLevel
Sets the minimum log level for server notifications. Uses RFC 5424 standard log levels and controls which notifications/message
events are sent to clients.
Request
Parameters
Field | Type | Required | Description |
---|---|---|---|
level | String | Yes | Log level (debug, info, notice, warning, error, critical, alert, emergency) |
Response
Log Levels (RFC 5424)
Level | Description | Example Use Case |
---|---|---|
debug | Detailed debugging information | Function entry/exit points |
info | General informational messages | Operation progress updates |
notice | Normal but significant events | Configuration changes |
warning | Warning conditions | Deprecated feature usage |
error | Error conditions | Operation failures |
critical | Critical conditions | System component failures |
alert | Action must be taken immediately | Data corruption detected |
emergency | System is unusable | Complete system failure |
Log Message Notifications
Once a level is set, the server sends notifications/message
for qualifying log events:
Pagination Utility
Cursor-based Pagination
Our implementation supports cursor-based pagination for all list operations that may return large result sets. Pagination uses opaque cursor tokens instead of numbered pages.
Supported Operations
resources/list
- List available resourcesresources/templates/list
- List resource templatesprompts/list
- List available promptstools/list
- List available tools
Pagination Request
Pagination Response
Pagination Features
- Opaque Cursors: Base64-encoded tokens containing position information
- Default Page Size: 50 items per page
- Maximum Page Size: 100 items per page
- Total Count: Not exposed (cursor-based approach)
- Stable Ordering: Consistent results across pagination requests
Pagination Flow
- First Request: Send list request without cursor parameter
- Check Next Cursor: Look for
nextCursor
in response - Continue Pagination: Use
nextCursor
value in subsequent requests - End Detection: Missing
nextCursor
indicates no more results
Error Handling
All utilities follow standard JSON-RPC 2.0 error responses:
Common Error Codes
Code | Message | Description |
---|---|---|
-32601 | Method not found | Utility method not supported |
-32602 | Invalid params | Missing or invalid parameters |
-32603 | Internal error | Server-side processing error |
Error Response Format
Security Considerations
Completion Security
- Input validation on all completion parameters
- Rate limiting to prevent abuse
- Access control based on OAuth permissions
- No sensitive data in completion suggestions
Logging Security
- Log messages must not contain credentials or secrets
- Personal identifying information is filtered
- Internal system details are sanitized
- Rate limiting prevents log flooding
Pagination Security
- Cursor validation prevents injection attacks
- Access control applied to all paginated resources
- Consistent permissions across pagination requests
- Resource filtering based on OAuth scope
Implementation Notes
Server Capabilities
These utilities are declared in the server’s capabilities during initialization:
Note: Pagination is implicit in list operations and does not require a separate capability declaration.
Rate Limiting
- Completion: Debounced requests recommended
- Logging: Message emission rate controlled by server
- Pagination: Standard HTTP rate limits apply
Client Integration
- Completion: Implement debouncing for real-time suggestions
- Logging: Handle notifications asynchronously
- Pagination: Cache cursors appropriately but do not persist across sessions
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
MCP session ID (required after initialization)
"session_abc123"
Path Parameters
Tenant identifier (e.g., 'pipedrive', 'salesforce', 'hubspot')
"pipedrive"
Body
Response
JSON-RPC 2.0 response
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.