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

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

Response (Success)

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

Response (Error)

number
required
Standard JSON-RPC error code
string
required
Human-readable error message
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:
Parse error
Invalid JSON received
Invalid request
Request is not a valid JSON-RPC 2.0 request
Method not found
The requested method does not exist
Invalid params
Invalid method parameters
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