🪄 GitHub 𝗚𝗿𝗮𝗽𝗵𝗤𝗟 & 𝗖𝗼𝗻𝘁𝗲𝘅𝘁 𝗖𝗼𝗻𝘁𝗿𝗼𝗹

Опубликовано: 28 Май 2026
на канале: reShapr
26
0

This video explores how to handle massive API schemas without overwhelming your AI. We demonstrate how to import the GitHub GraphQL API and use reShapr’s unique filtering and CustomTools features to drastically reduce the "Context Overload" for your LLM and MCP client application.

📝 WHAT’S COVERED
In this demo, we tackle the challenge of a huge GraphQL schema by executing the following:
✅ GitHub GraphQL Import: Fetching the official schema and mapping it to the GitHub backend.
✅ Context Overload Visualization: Demonstrating how a raw import creates a massive tools list that can confuse LLMs.
✅ I/O Filtering: Using the --io flag to filter the schema down to a single specific query (like user) and its related types.
✅ Fine-Tuning with CustomTools: Using a YAML configuration to achieve surgical precision over the tools exposed to the MCP client.
✅ Context Management: Comparing the character count of tool responses to see the reduction in context window usage.

💻 COMMANDS USED
reshapr login -u admin -p password -s http://localhost:5555
reshapr service list
wget https://docs.github.com/public/fpt/sc...
reshapr import -f ./schema.docs.graphql --sn \"GitHub GraphQL\" --sv 20260410 --be https://api.github.com/graphql
reshapr service list
curl http://localhost:7777/mcp/reshapr/GitHub+GraphQL/20260410 -H 'Content-type: application/json' -X POST -d '{\"jsonrpc\": \"2.0\", \"method\": \"tools/list\", \"params\": {}}' -s | wc -c
reshapr import -f ./schema.docs.graphql --sn \"GitHub GraphQL\" --sv 20260410 --be https://api.github.com/graphql --io '[\"user\"]'
curl http://localhost:7777/mcp/reshapr/GitHub+GraphQL/20260410 -H 'Content-type: application/json' -X POST -d '{\"jsonrpc\": \"2.0\", \"method\": \"tools/list\", \"params\": {}}' -s | wc -c
reshapr attach -f ./github-api-custom-tools.yaml
curl http://localhost:7777/mcp/reshapr/GitHub+GraphQL/20260410 -H 'Content-type: application/json' -X POST -d '{\"jsonrpc\": \"2.0\", \"method\": \"tools/list\", \"params\": {}}' -s | wc -c

🤩 GITHUB USER CUSTOMTOOL
❯ cat ./github-api-custom-tools.yaml
apiVersion: reshapr.io/v1alpha1
kind: CustomTools
service:
name: GitHub GraphQL
version: '20260410'
customTools:
get_user_with_latest_followers:
tool: user
description: Get a user details with the latest followers details
input:
type: object
properties:
user:
type: string
description: The GitHub login of the user to fetch
required:
user
arguments:
login: ${user}
__relation_avatarUrl:
size: 32
__relation_followers:
last: 10

📡 WHY CONTEXT CONTROL?
When you expose a huge API to an LLM, the "noise" (unnecessary tools) consumes tokens and leads to errors. As shown in the demo, reShapr lets you shrink the tools list from thousands of characters to a manageable, highly relevant set.

Read the full story on moving from Context Overload to Context Control:
👉 http://bit.ly/3Pnaige

🌐 GET STARTED
Explore our interactive playground at https://try.reshapr.io/
📖 Docs: https://reshapr.io/docs/

🚀 JOIN THE COMMUNITY
🌐 Website: https://reshapr.io/community
⭐ GitHub: https://github.com/reshaprio/reshapr
💬 Discord:   / discord  

Follow us on socials:
🔹 LinkedIn:   / reshapr  
🔹 X (Twitter): https://x.com/reshaprio
🔹 Bluesky: https://bsky.app/profile/reshapr.io

Subscribe to the reShapr channel for more demos on how to make your APIs AI-ready!