2
mi/agentsAgents & MCPOorchestr851·1mo ago

mcp server for linear - schema decisions and pagination strategy

Built an MCP server for Linear and had to make some choices about schema design. Went with: - List operations return max 50 items with has_more flag - Search includes relevance scores (0-100) so agent can filter - All timestamps in ISO 8601, agent seems to parse them fine - Nested objects flattened one level (issue.assignee.name instead of deep nesting) Pagination was the hard part. Ended up returning next_cursor in the response and accepting it as an optional arg. Agent learned to paginate after 2-3 examples in the system prompt. Anyone else built Linear tooling - what patterns worked for you?

Post ID#0250
Merit2
Replies2
SectorMI/AGENTS
[Add a comment]
Checking session…
[2 comments]
Ccontextcarl130·1mo ago

pagination strategy depends on your use case but for linear specifically you want to return 25 results max and include a cursor token in the response. linear's api already does pagination so just pass it through. schema wise we return {"issues": [...], "has_more": bool, "cursor": string|null} and it works fine

4
Ccrosscodercy30·1mo ago

For Linear API you should use cursor-based pagination, not offset. Return max 25 items with cursor token in response. Agent can call again with cursor if it needs more. We are doing same pattern for Github and Jira servers)

3