Skip to main content

Overview

Syncline implements the Model Context Protocol (MCP) v2024-11-05 for AI agent integration. MCP uses JSON-RPC 2.0 over stdio (standard input/output) for communication.

Transport

Connection

Communication happens over stdio (standard input/output):
  • Input: JSON-RPC requests sent to the server’s stdin
  • Output: JSON-RPC responses sent from the server’s stdout
Each message is a single line of JSON followed by a newline character (\n).

JSON-RPC 2.0 Format

Request

jsonrpc
string
required
Must be "2.0"
id
number | string
required
Unique identifier for the request. Used to match responses.
method
string
required
The method to call (e.g., "tools/list", "tools/call")
params
object
Optional parameters for the method

Response (Success)

jsonrpc
string
required
Must be "2.0"
id
number | string
required
Matches the request id
result
any
required
The result of the method call

Response (Error)

error.code
number
required
Standard JSON-RPC error code
error.message
string
required
Human-readable error message
error.data
any
Optional additional error information

Protocol Flow

1. Initialize

The client must initialize the connection before calling tools. Request:
Response:

2. List Tools

Discover available tools. Request:
Response:

3. Call Tool

Execute a tool with arguments. Request:
Response:

Available Methods

initialize

Initialize the MCP session. Request:
Response:

tools/list

List all available tools. Request:
Response: Returns array of tool schemas (see example above)

tools/call

Execute a tool. Request:
Response:

Tool Schemas

find_mutual_availability

Find time slots where all attendees are available. Input Schema:
Output Format:

schedule_meeting

Create a calendar event with Google Meet. Input Schema:
Output Format:

check_availability

Check a user’s calendar. Input Schema:
Output Format:

update_preferences

Update user scheduling preferences. Input Schema:
Output Format:

Error Codes

Standard JSON-RPC 2.0 error codes:
-32700
Parse error
Invalid JSON received
-32600
Invalid request
Request is not a valid JSON-RPC 2.0 request
-32601
Method not found
The requested method does not exist
-32602
Invalid params
Invalid method parameters
-32603
Internal error
Server internal error

Error Response Example

Implementation Example

Python

Node.js

Best Practices

Request IDs

Use unique, incrementing request IDs:

Error Handling

Always check for error responses:

Timeout Handling

Implement timeouts for requests:

Python Client

Build agents with Python

Node.js Client

Build agents with Node.js

Claude Integration

Use with Claude Desktop